mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2024-11-29 21:41:05 +01:00
[MediaCCC] Apply changes in extractor tests
Also remove some public test methods modifiers.
This commit is contained in:
parent
0292c4f3e8
commit
e8bfd20170
@ -9,6 +9,7 @@ import org.schabi.newpipe.extractor.services.media_ccc.extractors.MediaCCCConfer
|
|||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertContainsImageUrlInImageCollection;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.MediaCCC;
|
import static org.schabi.newpipe.extractor.ServiceList.MediaCCC;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,27 +31,29 @@ public class MediaCCCConferenceExtractorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testName() throws Exception {
|
void testName() throws Exception {
|
||||||
assertEquals("FrOSCon 2017", extractor.getName());
|
assertEquals("FrOSCon 2017", extractor.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetUrl() throws Exception {
|
void testGetUrl() throws Exception {
|
||||||
assertEquals("https://media.ccc.de/c/froscon2017", extractor.getUrl());
|
assertEquals("https://media.ccc.de/c/froscon2017", extractor.getUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetOriginalUrl() throws Exception {
|
void testGetOriginalUrl() throws Exception {
|
||||||
assertEquals("https://media.ccc.de/c/froscon2017", extractor.getOriginalUrl());
|
assertEquals("https://media.ccc.de/c/froscon2017", extractor.getOriginalUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetThumbnailUrl() throws Exception {
|
void testGetThumbnails() {
|
||||||
assertEquals("https://static.media.ccc.de/media/events/froscon/2017/logo.png", extractor.getAvatarUrl());
|
assertContainsImageUrlInImageCollection(
|
||||||
|
"https://static.media.ccc.de/media/events/froscon/2017/logo.png",
|
||||||
|
extractor.getAvatars());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetInitalPage() throws Exception {
|
void testGetInitalPage() throws Exception {
|
||||||
assertEquals(97, tabExtractor.getInitialPage().getItems().size());
|
assertEquals(97, tabExtractor.getInitialPage().getItems().size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -70,27 +73,29 @@ public class MediaCCCConferenceExtractorTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testName() throws Exception {
|
void testName() throws Exception {
|
||||||
assertEquals("Open Source Conference Albania 2019", extractor.getName());
|
assertEquals("Open Source Conference Albania 2019", extractor.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetUrl() throws Exception {
|
void testGetUrl() throws Exception {
|
||||||
assertEquals("https://media.ccc.de/c/oscal19", extractor.getUrl());
|
assertEquals("https://media.ccc.de/c/oscal19", extractor.getUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetOriginalUrl() throws Exception {
|
void testGetOriginalUrl() throws Exception {
|
||||||
assertEquals("https://media.ccc.de/c/oscal19", extractor.getOriginalUrl());
|
assertEquals("https://media.ccc.de/c/oscal19", extractor.getOriginalUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetThumbnailUrl() throws Exception {
|
void testGetThumbnailUrl() {
|
||||||
assertEquals("https://static.media.ccc.de/media/events/oscal/2019/oscal-19.png", extractor.getAvatarUrl());
|
assertContainsImageUrlInImageCollection(
|
||||||
|
"https://static.media.ccc.de/media/events/oscal/2019/oscal-19.png",
|
||||||
|
extractor.getAvatars());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetInitalPage() throws Exception {
|
void testGetInitalPage() throws Exception {
|
||||||
assertTrue(tabExtractor.getInitialPage().getItems().size() >= 21);
|
assertTrue(tabExtractor.getInitialPage().getItems().size() >= 21);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertContainsImageUrlInImageCollection;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.MediaCCC;
|
import static org.schabi.newpipe.extractor.ServiceList.MediaCCC;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,16 +67,20 @@ public class MediaCCCStreamExtractorTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Test
|
@Test
|
||||||
public void testThumbnailUrl() throws Exception {
|
public void testThumbnails() throws Exception {
|
||||||
super.testThumbnailUrl();
|
super.testThumbnails();
|
||||||
assertEquals("https://static.media.ccc.de/media/events/gpn/gpn18/105-hd.jpg", extractor.getThumbnailUrl());
|
assertContainsImageUrlInImageCollection(
|
||||||
|
"https://static.media.ccc.de/media/events/gpn/gpn18/105-hd_preview.jpg",
|
||||||
|
extractor.getThumbnails());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Test
|
@Test
|
||||||
public void testUploaderAvatarUrl() throws Exception {
|
public void testUploaderAvatars() throws Exception {
|
||||||
super.testUploaderAvatarUrl();
|
super.testUploaderAvatars();
|
||||||
assertEquals("https://static.media.ccc.de/media/events/gpn/gpn18/logo.png", extractor.getUploaderAvatarUrl());
|
assertContainsImageUrlInImageCollection(
|
||||||
|
"https://static.media.ccc.de/media/events/gpn/gpn18/logo.png",
|
||||||
|
extractor.getUploaderAvatars());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -140,16 +145,20 @@ public class MediaCCCStreamExtractorTest {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Test
|
@Test
|
||||||
public void testThumbnailUrl() throws Exception {
|
public void testThumbnails() throws Exception {
|
||||||
super.testThumbnailUrl();
|
super.testThumbnails();
|
||||||
assertEquals("https://static.media.ccc.de/media/congress/2019/10565-hd.jpg", extractor.getThumbnailUrl());
|
assertContainsImageUrlInImageCollection(
|
||||||
|
"https://static.media.ccc.de/media/congress/2019/10565-hd_preview.jpg",
|
||||||
|
extractor.getThumbnails());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Test
|
@Test
|
||||||
public void testUploaderAvatarUrl() throws Exception {
|
public void testUploaderAvatars() throws Exception {
|
||||||
super.testUploaderAvatarUrl();
|
super.testUploaderAvatars();
|
||||||
assertEquals("https://static.media.ccc.de/media/congress/2019/logo.png", extractor.getUploaderAvatarUrl());
|
assertContainsImageUrlInImageCollection(
|
||||||
|
"https://static.media.ccc.de/media/congress/2019/logo.png",
|
||||||
|
extractor.getUploaderAvatars());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user