diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java index ceb5852c9..2d4f47357 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java @@ -2,7 +2,6 @@ package org.schabi.newpipe.extractor.services.youtube; import com.grack.nanojson.JsonWriter; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.schabi.newpipe.downloader.DownloaderFactory; import org.schabi.newpipe.extractor.ExtractorAsserts; @@ -11,6 +10,8 @@ import org.schabi.newpipe.extractor.ListExtractor.InfoItemsPage; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.Page; import org.schabi.newpipe.extractor.exceptions.ExtractionException; +import org.schabi.newpipe.extractor.exceptions.ParsingException; +import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeMixPlaylistExtractor; import org.schabi.newpipe.extractor.stream.StreamInfoItem; @@ -118,6 +119,11 @@ public class YoutubeMixPlaylistExtractorTest { void getStreamCount() { assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); } + + @Test + void getPlaylistType() throws ParsingException { + assertEquals(PlaylistInfo.PlaylistType.MIX_STREAM, extractor.getPlaylistType()); + } } public static class MixWithIndex { @@ -203,6 +209,11 @@ public class YoutubeMixPlaylistExtractorTest { void getStreamCount() { assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); } + + @Test + void getPlaylistType() throws ParsingException { + assertEquals(PlaylistInfo.PlaylistType.MIX_STREAM, extractor.getPlaylistType()); + } } public static class MyMix { @@ -287,6 +298,11 @@ public class YoutubeMixPlaylistExtractorTest { void getStreamCount() { assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); } + + @Test + void getPlaylistType() throws ParsingException { + assertEquals(PlaylistInfo.PlaylistType.MIX_STREAM, extractor.getPlaylistType()); + } } public static class Invalid { @@ -381,5 +397,10 @@ public class YoutubeMixPlaylistExtractorTest { void getStreamCount() { assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); } + + @Test + void getPlaylistType() throws ParsingException { + assertEquals(PlaylistInfo.PlaylistType.MIX_CHANNEL, extractor.getPlaylistType()); + } } } diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java index 80fb2c36a..5a342b61e 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubePlaylistExtractorTest.java @@ -8,9 +8,9 @@ import org.schabi.newpipe.extractor.ExtractorAsserts; import org.schabi.newpipe.extractor.ListExtractor; import org.schabi.newpipe.extractor.NewPipe; import org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException; -import org.schabi.newpipe.extractor.exceptions.ExtractionException; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.playlist.PlaylistExtractor; +import org.schabi.newpipe.extractor.playlist.PlaylistInfo; import org.schabi.newpipe.extractor.services.BasePlaylistExtractorTest; import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubePlaylistExtractor; import org.schabi.newpipe.extractor.stream.StreamInfoItem; @@ -162,6 +162,11 @@ public class YoutubePlaylistExtractorTest { public void testUploaderVerified() throws Exception { assertFalse(extractor.isUploaderVerified()); } + + @Test + void getPlaylistType() throws ParsingException { + assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType()); + } } public static class HugePlaylist implements BasePlaylistExtractorTest { @@ -281,6 +286,11 @@ public class YoutubePlaylistExtractorTest { public void testUploaderVerified() throws Exception { assertTrue(extractor.isUploaderVerified()); } + + @Test + void getPlaylistType() throws ParsingException { + assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType()); + } } public static class LearningPlaylist implements BasePlaylistExtractorTest { @@ -386,6 +396,11 @@ public class YoutubePlaylistExtractorTest { public void testUploaderVerified() throws Exception { assertTrue(extractor.isUploaderVerified()); } + + @Test + void getPlaylistType() throws ParsingException { + assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType()); + } } public static class ContinuationsTests {