From 5448e1f390782ebc3c810ff64e151c89ddcdbc31 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 13 May 2022 20:22:47 +0200 Subject: Remove gpodder toplist Half of the toplist no longer returns a valid podcast feed. Some of the suggested tags are just random characters and none of them is actually helpful. This does not remove search or synchronization. Just gpodder discovery. --- .../antennapod/gpodnet/GPodnetServiceTest.java | 110 --------------------- 1 file changed, 110 deletions(-) delete mode 100644 app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java (limited to 'app/src/androidTest') diff --git a/app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java b/app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java deleted file mode 100644 index b13af78f7..000000000 --- a/app/src/androidTest/java/de/test/antennapod/gpodnet/GPodnetServiceTest.java +++ /dev/null @@ -1,110 +0,0 @@ -package de.test.antennapod.gpodnet; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import androidx.test.ext.junit.runners.AndroidJUnit4; -import de.danoeh.antennapod.core.service.download.AntennapodHttpClient; -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetService; -import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetServiceException; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetDevice; -import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetTag; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; - -import static java.util.Collections.singletonList; - -/** - * Test class for GpodnetService - */ -@Ignore("Needs valid credentials to run") -@RunWith(AndroidJUnit4.class) -public class GPodnetServiceTest { - - private GpodnetService service; - - private static final String USER = ""; - private static final String PW = ""; - private static final String DEVICE_ID = "radio"; - - @Before - public void setUp() { - service = new GpodnetService(AntennapodHttpClient.getHttpClient(), - GpodnetService.DEFAULT_BASE_HOST, DEVICE_ID, USER, PW); - } - - private void authenticate() throws GpodnetServiceException { - service.login(); - } - - @Test - public void testUploadSubscription() throws GpodnetServiceException { - authenticate(); - ArrayList l = new ArrayList<>(); - l.add("http://bitsundso.de/feed"); - service.uploadSubscriptions(DEVICE_ID, l); - } - - @Test - public void testUploadSubscription2() throws GpodnetServiceException { - authenticate(); - ArrayList l = new ArrayList<>(); - l.add("http://bitsundso.de/feed"); - l.add("http://gamesundso.de/feed"); - service.uploadSubscriptions(DEVICE_ID, l); - } - - @Test - public void testUploadChanges() throws GpodnetServiceException { - authenticate(); - String[] URLS = {"http://bitsundso.de/feed", "http://gamesundso.de/feed", "http://cre.fm/feed/mp3/", "http://freakshow.fm/feed/m4a/"}; - List subscriptions = Arrays.asList(URLS[0], URLS[1]); - List removed = singletonList(URLS[0]); - List added = Arrays.asList(URLS[2], URLS[3]); - service.uploadSubscriptions(DEVICE_ID, subscriptions); - service.uploadSubscriptionChanges(added, removed); - } - - @Test - public void testGetSubscriptionChanges() throws GpodnetServiceException { - authenticate(); - service.getSubscriptionChanges(1362322610L); - } - - @Test - public void testConfigureDevices() throws GpodnetServiceException { - authenticate(); - service.configureDevice("foo", "This is an updated caption", GpodnetDevice.DeviceType.LAPTOP); - } - - @Test - public void testGetDevices() throws GpodnetServiceException { - authenticate(); - service.getDevices(); - } - - @Test - public void testTags() throws GpodnetServiceException { - service.getTopTags(20); - } - - @Test - public void testPodcastForTags() throws GpodnetServiceException { - List tags = service.getTopTags(20); - service.getPodcastsForTag(tags.get(1), - 10); - } - - @Test - public void testSearch() throws GpodnetServiceException { - service.searchPodcasts("linux", 64); - } - - @Test - public void testToplist() throws GpodnetServiceException { - service.getPodcastToplist(10); - } -} -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0