@@ -234,4 +234,111 @@ public void testTags() throws Exception {
234234 assertTrue (extractor .getTags ().isEmpty ());
235235 }
236236 }
237+
238+ public static class DocumentaryChannel implements BaseChannelExtractorTest {
239+ // https://github.com/TeamNewPipe/NewPipe/issues/11369
240+
241+ private static PeertubeChannelExtractor extractor ;
242+
243+ @ BeforeAll
244+ public static void setUp () throws Exception {
245+ NewPipe .init (DownloaderTestImpl .getInstance ());
246+ // setting instance might break test when running in parallel
247+ PeerTube .setInstance (new PeertubeInstance ("https://kolektiva.media" , "kolektiva.media" ));
248+ extractor = (PeertubeChannelExtractor ) PeerTube
249+ .getChannelExtractor ("https://kolektiva.media/video-channels/documentary_channel" );
250+ extractor .fetchPage ();
251+ }
252+
253+ /*//////////////////////////////////////////////////////////////////////////
254+ // Extractor
255+ //////////////////////////////////////////////////////////////////////////*/
256+
257+ @ Test
258+ public void testServiceId () {
259+ assertEquals (PeerTube .getServiceId (), extractor .getServiceId ());
260+ }
261+
262+ @ Test
263+ public void testName () throws ParsingException {
264+ assertEquals ("Documentary Channel" , extractor .getName ());
265+ }
266+
267+ @ Test
268+ public void testId () throws ParsingException {
269+ assertEquals ("video-channels/documentary_channel" , extractor .getId ());
270+ }
271+
272+ @ Test
273+ public void testUrl () throws ParsingException {
274+ assertEquals ("https://kolektiva.media/video-channels/documentary_channel" , extractor .getUrl ());
275+ }
276+
277+ @ Test
278+ public void testOriginalUrl () throws ParsingException {
279+ assertEquals ("https://kolektiva.media/video-channels/documentary_channel" , extractor .getOriginalUrl ());
280+ }
281+
282+ /*//////////////////////////////////////////////////////////////////////////
283+ // ChannelExtractor
284+ //////////////////////////////////////////////////////////////////////////*/
285+
286+ @ Test
287+ public void testDescription () {
288+ assertNotNull (extractor .getDescription ());
289+ }
290+
291+ @ Test
292+ void testParentChannelName () throws ParsingException {
293+ assertEquals ("consumedmind" , extractor .getParentChannelName ());
294+ }
295+
296+ @ Test
297+ void testParentChannelUrl () throws ParsingException {
298+ assertEquals ("https://kolektiva.media/accounts/consumedmind" , extractor .getParentChannelUrl ());
299+ }
300+
301+ @ Test
302+ void testParentChannelAvatars () {
303+ defaultTestImageCollection (extractor .getParentChannelAvatars ());
304+ }
305+
306+ @ Test
307+ public void testAvatars () {
308+ defaultTestImageCollection (extractor .getAvatars ());
309+ }
310+
311+ @ Test
312+ public void testBanners () throws ParsingException {
313+ assertGreaterOrEqual (1 , extractor .getBanners ().size ());
314+ }
315+
316+ @ Test
317+ public void testFeedUrl () throws ParsingException {
318+ assertEquals ("https://kolektiva.media/feeds/videos.xml?videoChannelId=2994" , extractor .getFeedUrl ());
319+ }
320+
321+ @ Test
322+ public void testSubscriberCount () {
323+ assertGreaterOrEqual (25 , extractor .getSubscriberCount ());
324+ }
325+
326+ @ Test
327+ @ Override
328+ public void testVerified () throws Exception {
329+ assertFalse (extractor .isVerified ());
330+ }
331+
332+ @ Test
333+ @ Override
334+ public void testTabs () throws Exception {
335+ assertTabsContain (extractor .getTabs (), ChannelTabs .VIDEOS , ChannelTabs .PLAYLISTS );
336+ }
337+
338+ @ Test
339+ @ Override
340+ public void testTags () throws Exception {
341+ assertTrue (extractor .getTags ().isEmpty ());
342+ }
343+ }
237344}
0 commit comments