diff options
Diffstat (limited to 'core/src/test')
-rw-r--r-- | core/src/test/java/de/danoeh/antennapod/core/storage/DbReaderTest.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/test/java/de/danoeh/antennapod/core/storage/DbReaderTest.java b/core/src/test/java/de/danoeh/antennapod/core/storage/DbReaderTest.java index 886c6821b..3fadf7528 100644 --- a/core/src/test/java/de/danoeh/antennapod/core/storage/DbReaderTest.java +++ b/core/src/test/java/de/danoeh/antennapod/core/storage/DbReaderTest.java @@ -13,6 +13,7 @@ import androidx.test.platform.app.InstrumentationRegistry; import de.danoeh.antennapod.model.feed.Feed; import de.danoeh.antennapod.model.feed.FeedItem; +import de.danoeh.antennapod.model.feed.FeedItemFilter; import de.danoeh.antennapod.model.feed.FeedMedia; import de.danoeh.antennapod.model.feed.SortOrder; import de.danoeh.antennapod.storage.preferences.UserPreferences; @@ -239,7 +240,8 @@ public class DbReaderTest { public void testGetDownloadedItems() { final int numItems = 10; List<FeedItem> downloaded = saveDownloadedItems(numItems); - List<FeedItem> downloadedSaved = DBReader.getDownloadedItems(null); + List<FeedItem> downloadedSaved = DBReader.getEpisodes(0, Integer.MAX_VALUE, + new FeedItemFilter(FeedItemFilter.DOWNLOADED), SortOrder.DATE_NEW_OLD); assertNotNull(downloadedSaved); assertEquals(downloaded.size(), downloadedSaved.size()); for (FeedItem item : downloadedSaved) { @@ -283,7 +285,8 @@ public class DbReaderTest { for (int i = 0; i < newItems.size(); i++) { unreadIds[i] = newItems.get(i).getId(); } - List<FeedItem> newItemsSaved = DBReader.getNewItemsList(0, Integer.MAX_VALUE, SortOrder.DATE_NEW_OLD); + List<FeedItem> newItemsSaved = DBReader.getEpisodes(0, Integer.MAX_VALUE, + new FeedItemFilter(FeedItemFilter.NEW), SortOrder.DATE_NEW_OLD); assertNotNull(newItemsSaved); assertEquals(newItemsSaved.size(), newItems.size()); for (FeedItem feedItem : newItemsSaved) { |