diff options
author | orionlee <orionlee@yahoo.com> | 2019-09-30 12:28:27 -0700 |
---|---|---|
committer | orionlee <orionlee@yahoo.com> | 2019-09-30 12:28:27 -0700 |
commit | c0befc98542bc147a8aa341c48e6445d4cfbbfb7 (patch) | |
tree | b1e7df734d82fcbadd53511bcdf36717037cf676 /app/src | |
parent | 4a0a825c0895e3052075b285c33cc0fdecaa291a (diff) | |
download | AntennaPod-c0befc98542bc147a8aa341c48e6445d4cfbbfb7.zip |
test tweak - ensure playback queue updated after download - use more concise assertTrue/False
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java index 2880e86eb..3a3a64d80 100644 --- a/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java +++ b/app/src/androidTest/java/de/test/antennapod/service/playback/PlaybackServiceTaskManagerTest.java @@ -31,8 +31,6 @@ import de.danoeh.antennapod.core.storage.PodDBAdapter; import de.danoeh.antennapod.core.util.playback.Playable; import io.reactivex.functions.Consumer; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; @@ -147,8 +145,7 @@ public class PlaybackServiceTaskManagerTest { PlaybackServiceTaskManager pstm = new PlaybackServiceTaskManager(c, defaultPSTM); final FeedItem testItem = pstm.getQueue().get(0); - assertThat("The item is not yet downloaded", - testItem.getMedia().isDownloaded(), is(false)); + assertFalse("The item should not yet be downloaded", testItem.getMedia().isDownloaded()); withFeedItemEventListener( feedItemEventListener -> { // simulate download complete (in DownloadService.MediaHandlerThread) @@ -164,8 +161,8 @@ public class PlaybackServiceTaskManagerTest { .until(() -> feedItemEventListener.getEvents().size() > 0); final FeedItem itemUpdated = pstm.getQueue().get(0); - assertThat("The queue in PlaybackService has been updated item after download is completed", - itemUpdated.getMedia().isDownloaded(), is(true)); + assertTrue("media.isDownloaded() should be true - The queue in PlaybackService should be updated after download is completed", + itemUpdated.getMedia().isDownloaded()); }); pstm.shutdown(); |