diff options
author | TacoTheDank <SkytkRSfan3895@gmail.com> | 2020-07-11 20:01:57 -0400 |
---|---|---|
committer | TacoTheDank <SkytkRSfan3895@gmail.com> | 2020-07-11 20:01:57 -0400 |
commit | 002ba1753df3307861dfc1fa26abde314d6e39b8 (patch) | |
tree | 9f806468307da94f052dd95493cac0deb5e95ccb /app/src/androidTest/java/de/test/antennapod/service | |
parent | fa30bc5447498d928a2ec3508ef93f2bb7c4821e (diff) | |
download | AntennaPod-002ba1753df3307861dfc1fa26abde314d6e39b8.zip |
Fix lambdas
Diffstat (limited to 'app/src/androidTest/java/de/test/antennapod/service')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java b/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java index b75044d73..90bd8c86b 100644 --- a/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java +++ b/app/src/androidTest/java/de/test/antennapod/service/download/DownloadServiceTest.java @@ -106,9 +106,7 @@ public class DownloadServiceTest { // OPEN: Ideally, I'd like the download time long enough so that multiple in-progress DownloadEvents // are generated (to simulate typical download), but it'll make download time quite long (1-2 seconds) // to do so - DownloadService.setDownloaderFactory(new StubDownloaderFactory(50, downloadStatus -> { - downloadStatus.setSuccessful(); - })); + DownloadService.setDownloaderFactory(new StubDownloaderFactory(50, DownloadStatus::setSuccessful)); UserPreferences.setEnqueueDownloadedEpisodes(enqueueDownloaded); withFeedItemEventListener(feedItemEventListener -> { @@ -146,9 +144,8 @@ public class DownloadServiceTest { private void doTestCancelDownload_UndoEnqueue(boolean itemAlreadyInQueue) throws Exception { Context context = InstrumentationRegistry.getTargetContext(); // let download take longer to ensure the test can cancel the download in time - DownloadService.setDownloaderFactory(new StubDownloaderFactory(30000, downloadStatus -> { - downloadStatus.setSuccessful(); - })); + DownloadService.setDownloaderFactory( + new StubDownloaderFactory(30000, DownloadStatus::setSuccessful)); UserPreferences.setEnqueueDownloadedEpisodes(true); UserPreferences.setEnableAutodownload(false); |