diff options
author | Martin Fietz <martin.fietz@gmail.com> | 2018-01-14 17:58:15 +0100 |
---|---|---|
committer | Martin Fietz <martin.fietz@gmail.com> | 2018-01-14 17:58:15 +0100 |
commit | 84b196746b9ca8007046eb8ee75cd4d885631791 (patch) | |
tree | 01ca4d673202d6ae9506eda08b6c4b7c77c93665 /app/src/androidTest | |
parent | f8d1f32e9b740429a9db66716f0950670c2ea8f6 (diff) | |
download | AntennaPod-84b196746b9ca8007046eb8ee75cd4d885631791.zip |
Replace single-argument 'Arrays.asList()' with 'Collections.singletonList()'
Diffstat (limited to 'app/src/androidTest')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java | 4 | ||||
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/storage/DBTasksTest.java | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java b/app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java index 5ae07badc..a880c330b 100644 --- a/app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java +++ b/app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java @@ -11,6 +11,8 @@ import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException; import de.danoeh.antennapod.core.gpoddernet.model.GpodnetDevice; import de.danoeh.antennapod.core.gpoddernet.model.GpodnetTag; +import static java.util.Collections.singletonList; + /** * Test class for GpodnetService */ @@ -55,7 +57,7 @@ public class GPodnetServiceTest extends AndroidTestCase { authenticate(); String[] URLS = {"http://bitsundso.de/feed", "http://gamesundso.de/feed", "http://cre.fm/feed/mp3/", "http://freakshow.fm/feed/m4a/"}; List<String> subscriptions = Arrays.asList(URLS[0], URLS[1]); - List<String> removed = Arrays.asList(URLS[0]); + List<String> removed = singletonList(URLS[0]); List<String> added = Arrays.asList(URLS[2], URLS[3]); service.uploadSubscriptions(USER, "radio", subscriptions); service.uploadChanges(USER, "radio", added, removed); diff --git a/app/src/androidTest/java/de/test/antennapod/storage/DBTasksTest.java b/app/src/androidTest/java/de/test/antennapod/storage/DBTasksTest.java index 13cf56ff4..93a9408b7 100644 --- a/app/src/androidTest/java/de/test/antennapod/storage/DBTasksTest.java +++ b/app/src/androidTest/java/de/test/antennapod/storage/DBTasksTest.java @@ -18,6 +18,8 @@ import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBTasks; import de.danoeh.antennapod.core.storage.PodDBAdapter; +import static java.util.Collections.singletonList; + /** * Test class for DBTasks */ @@ -125,7 +127,7 @@ public class DBTasksTest extends InstrumentationTestCase { public void testUpdateFeedMediaUrlResetState() { final Feed feed = new Feed("url", null, "title"); FeedItem item = new FeedItem(0, "item", "id", "link", new Date(), FeedItem.PLAYED, feed); - feed.setItems(Arrays.asList(item)); + feed.setItems(singletonList(item)); PodDBAdapter adapter = PodDBAdapter.getInstance(); adapter.open(); @@ -138,7 +140,7 @@ public class DBTasksTest extends InstrumentationTestCase { FeedMedia media = new FeedMedia(item, "url", 1024, "mime/type"); item.setMedia(media); - feed.setItems(Arrays.asList(item)); + feed.setItems(singletonList(item)); final Feed newFeed = DBTasks.updateFeed(context, feed)[0]; assertTrue(feed != newFeed); |