99import org .schabi .newpipe .extractor .channel .tabs .ChannelTabExtractor ;
1010import org .schabi .newpipe .extractor .channel .tabs .ChannelTabs ;
1111import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
12- import org .schabi .newpipe .extractor .exceptions .ParsingException ;
13- import org .schabi .newpipe .extractor .services .BaseListExtractorTest ;
1412import org .schabi .newpipe .extractor .services .DefaultListExtractorTest ;
1513import org .schabi .newpipe .extractor .services .soundcloud .extractors .SoundcloudChannelTabExtractor ;
1614
1715import java .io .IOException ;
1816
1917import static org .junit .jupiter .api .Assertions .assertEquals ;
20- import static org .schabi .newpipe .extractor .ServiceList .PeerTube ;
2118import static org .schabi .newpipe .extractor .ServiceList .SoundCloud ;
2219import static org .schabi .newpipe .extractor .services .DefaultTests .defaultTestGetPageInNewExtractor ;
23- import static org .schabi .newpipe .extractor .services .DefaultTests .defaultTestMoreItems ;
24- import static org .schabi .newpipe .extractor .services .DefaultTests .defaultTestRelatedItems ;
2520
2621class SoundcloudChannelTabExtractorTest {
2722
@@ -95,7 +90,7 @@ static void setUp() throws IOException, ExtractionException {
9590 @ Override public boolean expectedHasMoreItems () { return true ; }
9691 }
9792
98- static class Likes extends DefaultListExtractorTest <ChannelTabExtractor > {
93+ static class LikesOnlyTracks extends DefaultListExtractorTest <ChannelTabExtractor > {
9994 private static SoundcloudChannelTabExtractor extractor ;
10095
10196 @ BeforeAll
@@ -122,4 +117,32 @@ void testGetPageInNewExtractor() throws Exception {
122117 defaultTestGetPageInNewExtractor (extractor , newTabExtractor );
123118 }
124119 }
120+
121+ static class LikesOnlyPlaylists extends DefaultListExtractorTest <ChannelTabExtractor > {
122+ private static SoundcloudChannelTabExtractor extractor ;
123+
124+ @ BeforeAll
125+ static void setUp () throws IOException , ExtractionException {
126+ NewPipe .init (DownloaderTestImpl .getInstance ());
127+ extractor = (SoundcloudChannelTabExtractor ) SoundCloud
128+ .getChannelTabExtractorFromId ("1280839267" , ChannelTabs .LIKES );
129+ extractor .fetchPage ();
130+ }
131+
132+ @ Override public ChannelTabExtractor extractor () throws Exception { return extractor ; }
133+ @ Override public StreamingService expectedService () throws Exception { return SoundCloud ; }
134+ @ Override public String expectedName () throws Exception { return ChannelTabs .LIKES ; }
135+ @ Override public String expectedId () throws Exception { return "1280839267" ; }
136+ @ Override public String expectedUrlContains () throws Exception { return "https://soundcloud.com/soreen-735855039/likes" ; }
137+ @ Override public String expectedOriginalUrlContains () throws Exception { return "https://soundcloud.com/soreen-735855039/likes" ; }
138+ @ Override public InfoItem .InfoType expectedInfoItemType () { return InfoItem .InfoType .PLAYLIST ; }
139+ @ Override public boolean expectedHasMoreItems () { return true ; }
140+
141+ @ Test
142+ void testGetPageInNewExtractor () throws Exception {
143+ final ChannelTabExtractor newTabExtractor =
144+ SoundCloud .getChannelTabExtractorFromId ("1280839267" , ChannelTabs .LIKES );
145+ defaultTestGetPageInNewExtractor (extractor , newTabExtractor );
146+ }
147+ }
125148}
0 commit comments