diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-07-15 15:55:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-15 15:55:24 +0200 |
commit | 75c3c4cf249b685d4c7ffc88b3db212963659df8 (patch) | |
tree | 2b942885462ef53b5c543dbadb62b79c9a637887 /core/src/test | |
parent | 6999a944bb3c1ce1547832ad15e401ff7cbbbe10 (diff) | |
download | AntennaPod-75c3c4cf249b685d4c7ffc88b3db212963659df8.zip |
Don't allow adding items without media to the queue (#6529)
Diffstat (limited to 'core/src/test')
-rw-r--r-- | core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java b/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java index 08842e5fb..fb7cad252 100644 --- a/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java +++ b/core/src/test/java/de/danoeh/antennapod/core/storage/DbWriterTest.java @@ -298,7 +298,6 @@ public class DbWriterTest { for (int i = 0; i < 10; i++) { FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed); feed.getItems().add(item); - } PodDBAdapter adapter = PodDBAdapter.getInstance(); @@ -444,6 +443,7 @@ public class DbWriterTest { // create items for (int i = 0; i < 10; i++) { FeedItem item = new FeedItem(0, "Item " + i, "Item" + i, "url", new Date(), FeedItem.PLAYED, feed); + item.setMedia(new FeedMedia(item, "", 0, "")); feed.getItems().add(item); } @@ -522,6 +522,7 @@ public class DbWriterTest { feed.setItems(new ArrayList<>()); for (int i = 0; i < numItems; i++) { FeedItem item = new FeedItem(0, "title " + i, "id " + i, "link " + i, new Date(), FeedItem.PLAYED, feed); + item.setMedia(new FeedMedia(item, "", 0, "")); feed.getItems().add(item); } @@ -548,6 +549,7 @@ public class DbWriterTest { Feed feed = new Feed("url", null, "title"); feed.setItems(new ArrayList<>()); FeedItem item = new FeedItem(0, "title", "id", "link", new Date(), FeedItem.PLAYED, feed); + item.setMedia(new FeedMedia(item, "", 0, "")); feed.getItems().add(item); PodDBAdapter adapter = PodDBAdapter.getInstance(); @@ -572,6 +574,7 @@ public class DbWriterTest { Feed feed = new Feed("url", null, "title"); feed.setItems(new ArrayList<>()); FeedItem item = new FeedItem(0, "title", "id", "link", new Date(), FeedItem.PLAYED, feed); + item.setMedia(new FeedMedia(item, "", 0, "")); feed.getItems().add(item); PodDBAdapter adapter = PodDBAdapter.getInstance(); @@ -714,6 +717,7 @@ public class DbWriterTest { for (int i = 0; i < numItems; i++) { FeedItem item = new FeedItem(0, "title " + i, "id " + i, "link " + i, new Date(), FeedItem.PLAYED, feed); + item.setMedia(new FeedMedia(item, "", 0, "")); feed.getItems().add(item); } @@ -762,6 +766,7 @@ public class DbWriterTest { for (int i = 0; i < numItems; i++) { FeedItem item = new FeedItem(0, "title " + i, "id " + i, "link " + i, new Date(), FeedItem.NEW, feed); + item.setMedia(new FeedMedia(item, "", 0, "")); feed.getItems().add(item); } @@ -788,6 +793,7 @@ public class DbWriterTest { for (int i = 0; i < numItems; i++) { FeedItem item = new FeedItem(0, "title " + i, "id " + i, "link " + i, new Date(), FeedItem.PLAYED, feed); + item.setMedia(new FeedMedia(item, "", 0, "")); feed.getItems().add(item); } |