|
2 | 2 |
|
3 | 3 | import com.grack.nanojson.JsonWriter; |
4 | 4 | import org.junit.jupiter.api.BeforeAll; |
5 | | -import org.junit.jupiter.api.Disabled; |
6 | 5 | import org.junit.jupiter.api.Test; |
7 | 6 | import org.schabi.newpipe.downloader.DownloaderFactory; |
8 | 7 | import org.schabi.newpipe.extractor.ExtractorAsserts; |
|
11 | 10 | import org.schabi.newpipe.extractor.NewPipe; |
12 | 11 | import org.schabi.newpipe.extractor.Page; |
13 | 12 | import org.schabi.newpipe.extractor.exceptions.ExtractionException; |
| 13 | +import org.schabi.newpipe.extractor.exceptions.ParsingException; |
| 14 | +import org.schabi.newpipe.extractor.playlist.PlaylistInfo; |
14 | 15 | import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeMixPlaylistExtractor; |
15 | 16 | import org.schabi.newpipe.extractor.stream.StreamInfoItem; |
16 | 17 |
|
@@ -118,6 +119,11 @@ void getContinuations() throws Exception { |
118 | 119 | void getStreamCount() { |
119 | 120 | assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); |
120 | 121 | } |
| 122 | + |
| 123 | + @Test |
| 124 | + void getPlaylistType() throws ParsingException { |
| 125 | + assertEquals(PlaylistInfo.PlaylistType.MIX_STREAM, extractor.getPlaylistType()); |
| 126 | + } |
121 | 127 | } |
122 | 128 |
|
123 | 129 | public static class MixWithIndex { |
@@ -203,6 +209,11 @@ void getContinuations() throws Exception { |
203 | 209 | void getStreamCount() { |
204 | 210 | assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); |
205 | 211 | } |
| 212 | + |
| 213 | + @Test |
| 214 | + void getPlaylistType() throws ParsingException { |
| 215 | + assertEquals(PlaylistInfo.PlaylistType.MIX_STREAM, extractor.getPlaylistType()); |
| 216 | + } |
206 | 217 | } |
207 | 218 |
|
208 | 219 | public static class MyMix { |
@@ -287,6 +298,11 @@ void getContinuations() throws Exception { |
287 | 298 | void getStreamCount() { |
288 | 299 | assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); |
289 | 300 | } |
| 301 | + |
| 302 | + @Test |
| 303 | + void getPlaylistType() throws ParsingException { |
| 304 | + assertEquals(PlaylistInfo.PlaylistType.MIX_STREAM, extractor.getPlaylistType()); |
| 305 | + } |
290 | 306 | } |
291 | 307 |
|
292 | 308 | public static class Invalid { |
@@ -381,5 +397,10 @@ void getPage() throws Exception { |
381 | 397 | void getStreamCount() { |
382 | 398 | assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount()); |
383 | 399 | } |
| 400 | + |
| 401 | + @Test |
| 402 | + void getPlaylistType() throws ParsingException { |
| 403 | + assertEquals(PlaylistInfo.PlaylistType.MIX_CHANNEL, extractor.getPlaylistType()); |
| 404 | + } |
384 | 405 | } |
385 | 406 | } |
0 commit comments