99
1010import static org .junit .jupiter .api .Assertions .assertEquals ;
1111import static org .junit .jupiter .api .Assertions .assertTrue ;
12+ import static org .schabi .newpipe .extractor .ExtractorAsserts .assertContainsImageUrlInImageCollection ;
1213import static org .schabi .newpipe .extractor .ServiceList .MediaCCC ;
1314
1415/**
@@ -30,27 +31,29 @@ public static void setUpClass() throws Exception {
3031 }
3132
3233 @ Test
33- public void testName () throws Exception {
34+ void testName () throws Exception {
3435 assertEquals ("FrOSCon 2017" , extractor .getName ());
3536 }
3637
3738 @ Test
38- public void testGetUrl () throws Exception {
39+ void testGetUrl () throws Exception {
3940 assertEquals ("https://media.ccc.de/c/froscon2017" , extractor .getUrl ());
4041 }
4142
4243 @ Test
43- public void testGetOriginalUrl () throws Exception {
44+ void testGetOriginalUrl () throws Exception {
4445 assertEquals ("https://media.ccc.de/c/froscon2017" , extractor .getOriginalUrl ());
4546 }
4647
4748 @ Test
48- public void testGetThumbnailUrl () throws Exception {
49- assertEquals ("https://static.media.ccc.de/media/events/froscon/2017/logo.png" , extractor .getAvatarUrl ());
49+ void testGetThumbnails () {
50+ assertContainsImageUrlInImageCollection (
51+ "https://static.media.ccc.de/media/events/froscon/2017/logo.png" ,
52+ extractor .getAvatars ());
5053 }
5154
5255 @ Test
53- public void testGetInitalPage () throws Exception {
56+ void testGetInitalPage () throws Exception {
5457 assertEquals (97 , tabExtractor .getInitialPage ().getItems ().size ());
5558 }
5659 }
@@ -70,27 +73,29 @@ public static void setUpClass() throws Exception {
7073 }
7174
7275 @ Test
73- public void testName () throws Exception {
76+ void testName () throws Exception {
7477 assertEquals ("Open Source Conference Albania 2019" , extractor .getName ());
7578 }
7679
7780 @ Test
78- public void testGetUrl () throws Exception {
81+ void testGetUrl () throws Exception {
7982 assertEquals ("https://media.ccc.de/c/oscal19" , extractor .getUrl ());
8083 }
8184
8285 @ Test
83- public void testGetOriginalUrl () throws Exception {
86+ void testGetOriginalUrl () throws Exception {
8487 assertEquals ("https://media.ccc.de/c/oscal19" , extractor .getOriginalUrl ());
8588 }
8689
8790 @ Test
88- public void testGetThumbnailUrl () throws Exception {
89- assertEquals ("https://static.media.ccc.de/media/events/oscal/2019/oscal-19.png" , extractor .getAvatarUrl ());
91+ void testGetThumbnailUrl () {
92+ assertContainsImageUrlInImageCollection (
93+ "https://static.media.ccc.de/media/events/oscal/2019/oscal-19.png" ,
94+ extractor .getAvatars ());
9095 }
9196
9297 @ Test
93- public void testGetInitalPage () throws Exception {
98+ void testGetInitalPage () throws Exception {
9499 assertTrue (tabExtractor .getInitialPage ().getItems ().size () >= 21 );
95100 }
96101 }
0 commit comments