summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java b/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java
index 902cad98c..ef5719d6f 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/PreferencesTest.java
@@ -10,6 +10,7 @@ import androidx.test.espresso.matcher.RootMatchers;
import androidx.test.filters.LargeTest;
import androidx.test.rule.ActivityTestRule;
+import de.danoeh.antennapod.core.storage.EpisodeCleanupAlgorithmFactory;
import org.awaitility.Awaitility;
import org.junit.Before;
import org.junit.Rule;
@@ -397,7 +398,7 @@ public class PreferencesTest {
onView(withId(R.id.select_dialog_listview)).perform(swipeDown());
onView(withText(R.string.episode_cleanup_except_favorite_removal)).perform(click());
Awaitility.await().atMost(1000, MILLISECONDS)
- .until(() -> UserPreferences.getEpisodeCleanupAlgorithm() instanceof ExceptFavoriteCleanupAlgorithm);
+ .until(() -> EpisodeCleanupAlgorithmFactory.build() instanceof ExceptFavoriteCleanupAlgorithm);
}
@Test
@@ -408,7 +409,7 @@ public class PreferencesTest {
onView(withId(R.id.select_dialog_listview)).perform(swipeDown());
onView(withText(R.string.episode_cleanup_queue_removal)).perform(click());
Awaitility.await().atMost(1000, MILLISECONDS)
- .until(() -> UserPreferences.getEpisodeCleanupAlgorithm() instanceof APQueueCleanupAlgorithm);
+ .until(() -> EpisodeCleanupAlgorithmFactory.build() instanceof APQueueCleanupAlgorithm);
}
@Test
@@ -419,7 +420,7 @@ public class PreferencesTest {
onView(withId(R.id.select_dialog_listview)).perform(swipeUp());
onView(withText(R.string.episode_cleanup_never)).perform(click());
Awaitility.await().atMost(1000, MILLISECONDS)
- .until(() -> UserPreferences.getEpisodeCleanupAlgorithm() instanceof APNullCleanupAlgorithm);
+ .until(() -> EpisodeCleanupAlgorithmFactory.build() instanceof APNullCleanupAlgorithm);
}
@Test
@@ -431,7 +432,7 @@ public class PreferencesTest {
onView(withText(R.string.episode_cleanup_after_listening)).perform(click());
Awaitility.await().atMost(1000, MILLISECONDS)
.until(() -> {
- EpisodeCleanupAlgorithm alg = UserPreferences.getEpisodeCleanupAlgorithm();
+ EpisodeCleanupAlgorithm alg = EpisodeCleanupAlgorithmFactory.build();
if (alg instanceof APCleanupAlgorithm) {
APCleanupAlgorithm cleanupAlg = (APCleanupAlgorithm) alg;
return cleanupAlg.getNumberOfHoursAfterPlayback() == 0;
@@ -450,7 +451,7 @@ public class PreferencesTest {
onView(withText(search)).perform(click());
Awaitility.await().atMost(1000, MILLISECONDS)
.until(() -> {
- EpisodeCleanupAlgorithm alg = UserPreferences.getEpisodeCleanupAlgorithm();
+ EpisodeCleanupAlgorithm alg = EpisodeCleanupAlgorithmFactory.build();
if (alg instanceof APCleanupAlgorithm) {
APCleanupAlgorithm cleanupAlg = (APCleanupAlgorithm) alg;
return cleanupAlg.getNumberOfHoursAfterPlayback() == 72; // 5 days