77import org .schabi .newpipe .extractor .MetaInfo ;
88import org .schabi .newpipe .extractor .localization .DateWrapper ;
99import org .schabi .newpipe .extractor .stream .AudioStream ;
10+ import org .schabi .newpipe .extractor .stream .ContentAvailability ;
1011import org .schabi .newpipe .extractor .stream .Description ;
1112import org .schabi .newpipe .extractor .stream .Frameset ;
1213import org .schabi .newpipe .extractor .stream .StreamExtractor ;
@@ -77,6 +78,7 @@ public abstract class DefaultStreamExtractorTest extends DefaultExtractorTest<St
7778 public String expectedSupportInfo () { return "" ; } // default: no support info available
7879 public int expectedStreamSegmentsCount () { return -1 ; } // return 0 or greater to test (default is -1 to ignore)
7980 public List <MetaInfo > expectedMetaInfo () throws MalformedURLException { return Collections .emptyList (); } // default: no metadata info available
81+ public ContentAvailability expectedContentAvailability () { return ContentAvailability .UNKNOWN ; } // default: unknown content availability
8082
8183 @ Test
8284 @ Override
@@ -429,6 +431,7 @@ public void testSupportInfo() throws Exception {
429431 }
430432
431433 @ Test
434+ @ Override
432435 public void testStreamSegmentsCount () throws Exception {
433436 if (expectedStreamSegmentsCount () >= 0 ) {
434437 assertEquals (expectedStreamSegmentsCount (), extractor ().getStreamSegments ().size ());
@@ -439,6 +442,7 @@ public void testStreamSegmentsCount() throws Exception {
439442 * @see DefaultSearchExtractorTest#testMetaInfo()
440443 */
441444 @ Test
445+ @ Override
442446 public void testMetaInfo () throws Exception {
443447 final List <MetaInfo > metaInfoList = extractor ().getMetaInfo ();
444448 final List <MetaInfo > expectedMetaInfoList = expectedMetaInfo ();
@@ -463,6 +467,11 @@ public void testMetaInfo() throws Exception {
463467 assertTrue (urls .contains (expectedUrl ));
464468 }
465469 }
470+ }
466471
472+ @ Test
473+ @ Override
474+ public void testContentAvailability () throws Exception {
475+ assertEquals (expectedContentAvailability (), extractor ().getContentAvailability ());
467476 }
468477}
0 commit comments