mirror of
https://github.com/TeamNewPipe/NewPipeExtractor
synced 2025-08-30 13:57:46 +00:00
Add tests
This commit is contained in:
@@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
|
|||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertContains;
|
||||||
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsSecureUrl;
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsSecureUrl;
|
||||||
import static org.schabi.newpipe.extractor.ServiceList.YouTube;
|
import static org.schabi.newpipe.extractor.ServiceList.YouTube;
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.assertNoMoreItems;
|
import static org.schabi.newpipe.extractor.services.DefaultTests.assertNoMoreItems;
|
||||||
@@ -163,6 +164,12 @@ public class YoutubePlaylistExtractorTest {
|
|||||||
void getPlaylistType() throws ParsingException {
|
void getPlaylistType() throws ParsingException {
|
||||||
assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType());
|
assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDescription() throws ParsingException {
|
||||||
|
final String description = extractor.getDescription();
|
||||||
|
assertContains("pop songs list", description);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class HugePlaylist implements BasePlaylistExtractorTest {
|
public static class HugePlaylist implements BasePlaylistExtractorTest {
|
||||||
@@ -286,6 +293,12 @@ public class YoutubePlaylistExtractorTest {
|
|||||||
void getPlaylistType() throws ParsingException {
|
void getPlaylistType() throws ParsingException {
|
||||||
assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType());
|
assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDescription() throws ParsingException {
|
||||||
|
final String description = extractor.getDescription();
|
||||||
|
assertContains("I Wanna Rock Super Gigantic Playlist", description);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class LearningPlaylist implements BasePlaylistExtractorTest {
|
public static class LearningPlaylist implements BasePlaylistExtractorTest {
|
||||||
@@ -394,6 +407,12 @@ public class YoutubePlaylistExtractorTest {
|
|||||||
void getPlaylistType() throws ParsingException {
|
void getPlaylistType() throws ParsingException {
|
||||||
assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType());
|
assertEquals(PlaylistInfo.PlaylistType.NORMAL, extractor.getPlaylistType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testDescription() throws ParsingException {
|
||||||
|
final String description = extractor.getDescription();
|
||||||
|
assertContains("47 episodes", description);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ContinuationsTests {
|
public static class ContinuationsTests {
|
||||||
|
Reference in New Issue
Block a user