|
1 | 1 | package org.schabi.newpipe.extractor.services.peertube; |
2 | 2 |
|
| 3 | +import static org.junit.jupiter.api.Assertions.assertEquals; |
| 4 | +import static org.schabi.newpipe.extractor.ServiceList.PeerTube; |
| 5 | + |
3 | 6 | import org.junit.jupiter.api.BeforeAll; |
4 | 7 | import org.junit.jupiter.api.Disabled; |
5 | 8 | import org.junit.jupiter.api.Test; |
|
19 | 22 |
|
20 | 23 | import javax.annotation.Nullable; |
21 | 24 |
|
22 | | -import static org.junit.jupiter.api.Assertions.assertEquals; |
23 | | -import static org.schabi.newpipe.extractor.ServiceList.PeerTube; |
24 | | - |
25 | 25 | public abstract class PeertubeStreamExtractorTest extends DefaultStreamExtractorTest { |
26 | 26 | private static final String BASE_URL = "/videos/watch/"; |
27 | 27 |
|
@@ -149,7 +149,7 @@ public static class AgeRestricted extends PeertubeStreamExtractorTest { |
149 | 149 |
|
150 | 150 | @BeforeAll |
151 | 151 | public static void setUp() throws Exception { |
152 | | - NewPipe.init(DownloaderTestImpl.getInstance());; |
| 152 | + NewPipe.init(DownloaderTestImpl.getInstance()); |
153 | 153 | // setting instance might break test when running in parallel (!) |
154 | 154 | PeerTube.setInstance(new PeertubeInstance(INSTANCE)); |
155 | 155 | extractor = PeerTube.getStreamExtractor(URL); |
@@ -238,21 +238,21 @@ public static void setUp() throws Exception { |
238 | 238 |
|
239 | 239 | @Test |
240 | 240 | public void testGetEmptyDescription() throws Exception { |
241 | | - StreamExtractor extractorEmpty = PeerTube.getStreamExtractor("https://framatube.org/api/v1/videos/d5907aad-2252-4207-89ec-a4b687b9337d"); |
| 241 | + final StreamExtractor extractorEmpty = PeerTube.getStreamExtractor("https://framatube.org/api/v1/videos/d5907aad-2252-4207-89ec-a4b687b9337d"); |
242 | 242 | extractorEmpty.fetchPage(); |
243 | 243 | assertEquals("", extractorEmpty.getDescription().getContent()); |
244 | 244 | } |
245 | 245 |
|
246 | 246 | @Test |
247 | 247 | public void testGetSmallDescription() throws Exception { |
248 | | - StreamExtractor extractorSmall = PeerTube.getStreamExtractor("https://peertube.cpy.re/videos/watch/d2a5ec78-5f85-4090-8ec5-dc1102e022ea"); |
| 248 | + final StreamExtractor extractorSmall = PeerTube.getStreamExtractor("https://peertube.cpy.re/videos/watch/d2a5ec78-5f85-4090-8ec5-dc1102e022ea"); |
249 | 249 | extractorSmall.fetchPage(); |
250 | 250 | assertEquals("https://www.kickstarter.com/projects/1587081065/nothing-to-hide-the-documentary", extractorSmall.getDescription().getContent()); |
251 | 251 | } |
252 | 252 |
|
253 | 253 | @Test |
254 | 254 | public void testGetSupportInformation() throws ExtractionException, IOException { |
255 | | - StreamExtractor supportInfoExtractor = PeerTube.getStreamExtractor("https://framatube.org/videos/watch/ee408ec8-07cd-4e35-b884-fb681a4b9d37"); |
| 255 | + final StreamExtractor supportInfoExtractor = PeerTube.getStreamExtractor("https://framatube.org/videos/watch/ee408ec8-07cd-4e35-b884-fb681a4b9d37"); |
256 | 256 | supportInfoExtractor.fetchPage(); |
257 | 257 | assertEquals("https://utip.io/chatsceptique", supportInfoExtractor.getSupportInfo()); |
258 | 258 | } |
|
0 commit comments