33import org .junit .jupiter .api .BeforeAll ;
44import org .junit .jupiter .api .Test ;
55import org .schabi .newpipe .downloader .DownloaderTestImpl ;
6- import org .schabi .newpipe .extractor .ExtractorAsserts ;
76import org .schabi .newpipe .extractor .NewPipe ;
87import org .schabi .newpipe .extractor .channel .tabs .ChannelTabs ;
98import org .schabi .newpipe .extractor .exceptions .ParsingException ;
1312import static org .junit .jupiter .api .Assertions .assertEquals ;
1413import static org .junit .jupiter .api .Assertions .assertFalse ;
1514import static org .junit .jupiter .api .Assertions .assertNotNull ;
16- import static org .junit .jupiter .api .Assertions .assertNull ;
1715import static org .junit .jupiter .api .Assertions .assertTrue ;
18- import static org .schabi .newpipe .extractor .ExtractorAsserts .assertIsSecureUrl ;
16+ import static org .schabi .newpipe .extractor .ExtractorAsserts .assertEmpty ;
17+ import static org .schabi .newpipe .extractor .ExtractorAsserts .assertGreaterOrEqual ;
1918import static org .schabi .newpipe .extractor .ExtractorAsserts .assertTabsContain ;
2019import static org .schabi .newpipe .extractor .ServiceList .PeerTube ;
20+ import static org .schabi .newpipe .extractor .services .DefaultTests .defaultTestImageCollection ;
2121
2222/**
2323 * Test for {@link PeertubeChannelExtractor}
@@ -71,33 +71,33 @@ public void testOriginalUrl() throws ParsingException {
7171 //////////////////////////////////////////////////////////////////////////*/
7272
7373 @ Test
74- public void testDescription () throws ParsingException {
74+ public void testDescription () {
7575 assertNotNull (extractor .getDescription ());
7676 }
7777
7878 @ Test
79- public void testParentChannelName () throws ParsingException {
79+ void testParentChannelName () throws ParsingException {
8080 assertEquals ("lqdn" , extractor .getParentChannelName ());
8181 }
8282
8383 @ Test
84- public void testParentChannelUrl () throws ParsingException {
84+ void testParentChannelUrl () throws ParsingException {
8585 assertEquals ("https://video.lqdn.fr/accounts/lqdn" , extractor .getParentChannelUrl ());
8686 }
8787
8888 @ Test
89- public void testParentChannelAvatarUrl () throws ParsingException {
90- assertIsSecureUrl (extractor .getParentChannelAvatarUrl ());
89+ void testParentChannelAvatarUrl () {
90+ defaultTestImageCollection (extractor .getParentChannelAvatars ());
9191 }
9292
9393 @ Test
94- public void testAvatarUrl () throws ParsingException {
95- assertIsSecureUrl (extractor .getAvatarUrl ());
94+ public void testAvatars () {
95+ defaultTestImageCollection (extractor .getAvatars ());
9696 }
9797
9898 @ Test
99- public void testBannerUrl () throws ParsingException {
100- assertNull (extractor .getBannerUrl ());
99+ public void testBanners () {
100+ assertEmpty (extractor .getBanners ());
101101 }
102102
103103 @ Test
@@ -106,10 +106,11 @@ public void testFeedUrl() throws ParsingException {
106106 }
107107
108108 @ Test
109- public void testSubscriberCount () throws ParsingException {
110- ExtractorAsserts . assertGreaterOrEqual (230 , extractor .getSubscriberCount ());
109+ public void testSubscriberCount () {
110+ assertGreaterOrEqual (230 , extractor .getSubscriberCount ());
111111 }
112112
113+ @ Test
113114 @ Override
114115 public void testVerified () throws Exception {
115116 assertFalse (extractor .isVerified ());
@@ -176,33 +177,33 @@ public void testOriginalUrl() throws ParsingException {
176177 //////////////////////////////////////////////////////////////////////////*/
177178
178179 @ Test
179- public void testDescription () throws ParsingException {
180+ public void testDescription () {
180181 assertNotNull (extractor .getDescription ());
181182 }
182183
183184 @ Test
184- public void testParentChannelName () throws ParsingException {
185+ void testParentChannelName () throws ParsingException {
185186 assertEquals ("nathan" , extractor .getParentChannelName ());
186187 }
187188
188189 @ Test
189- public void testParentChannelUrl () throws ParsingException {
190+ void testParentChannelUrl () throws ParsingException {
190191 assertEquals ("https://skeptikon.fr/accounts/nathan" , extractor .getParentChannelUrl ());
191192 }
192193
193194 @ Test
194- public void testParentChannelAvatarUrl () throws ParsingException {
195- assertIsSecureUrl (extractor .getParentChannelAvatarUrl ());
195+ void testParentChannelAvatars () {
196+ defaultTestImageCollection (extractor .getParentChannelAvatars ());
196197 }
197198
198199 @ Test
199- public void testAvatarUrl () throws ParsingException {
200- assertIsSecureUrl (extractor .getAvatarUrl ());
200+ public void testAvatars () {
201+ defaultTestImageCollection (extractor .getAvatars ());
201202 }
202203
203204 @ Test
204- public void testBannerUrl () throws ParsingException {
205- assertNull (extractor .getBannerUrl ());
205+ public void testBanners () throws ParsingException {
206+ assertEmpty (extractor .getBanners ());
206207 }
207208
208209 @ Test
@@ -211,10 +212,11 @@ public void testFeedUrl() throws ParsingException {
211212 }
212213
213214 @ Test
214- public void testSubscriberCount () throws ParsingException {
215- ExtractorAsserts . assertGreaterOrEqual (700 , extractor .getSubscriberCount ());
215+ public void testSubscriberCount () {
216+ assertGreaterOrEqual (700 , extractor .getSubscriberCount ());
216217 }
217218
219+ @ Test
218220 @ Override
219221 public void testVerified () throws Exception {
220222 assertFalse (extractor .isVerified ());
0 commit comments