diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-03-01 20:52:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 20:52:23 +0100 |
commit | 24d1a06662c8eec31f3a4c3ebdcd3aea759fb63a (patch) | |
tree | 82873a97be29ec64127a07773ac8911657547b68 /core/src/test | |
parent | 581e71b306bbc28dc504bde1d1bba6d6121e26e1 (diff) | |
download | AntennaPod-24d1a06662c8eec31f3a4c3ebdcd3aea759fb63a.zip |
Instead of specialized methods, use the global 'getEpisodes' method with a filter (#6358)
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) { |