File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ public String getUrl(String id, String baseUrl) throws ParsingException {
5050 * @return a {@link LinkHandler} complete with information
5151 */
5252 public LinkHandler fromUrl (final String url ) throws ParsingException {
53+ if (Utils .isNullOrEmpty (url )) {
54+ throw new IllegalArgumentException ("The url is null or empty" );
55+ }
5356 final String polishedUrl = Utils .followGoogleRedirectIfNeeded (url );
5457 final String baseUrl = Utils .getBaseUrl (polishedUrl );
5558 return fromUrl (polishedUrl , baseUrl );
Original file line number Diff line number Diff line change @@ -26,16 +26,13 @@ public static void setUpClass() throws Exception {
2626 }
2727
2828 @ Test
29- @ Ignore ("TODO fix" )
3029 public void testStreamList () throws Exception {
3130 final List <StreamInfoItem > items = extractor .getInitialPage ().getItems ();
3231 assertEquals (100 , items .size ());
3332 for (final StreamInfoItem item : items ) {
3433 assertFalse (isNullOrEmpty (item .getName ()));
3534 assertTrue (item .getDuration () > 0 );
36- assertTrue (isNullOrEmpty (item .getUploaderName ())); // we do not get the uploader name
3735 assertTrue (item .getUploadDate ().offsetDateTime ().isBefore (OffsetDateTime .now ()));
38- assertTrue (item .getUploadDate ().offsetDateTime ().isAfter (OffsetDateTime .now ().minusYears (1 )));
3936 }
4037 }
4138
Original file line number Diff line number Diff line change @@ -101,7 +101,6 @@ public void testFeedUrl() throws ParsingException {
101101 }
102102
103103 @ Test
104- @ Ignore ("TODO fix" )
105104 public void testSubscriberCount () throws ParsingException {
106105 assertTrue ("Wrong subscriber count" , extractor .getSubscriberCount () >= 500 );
107106 }
Original file line number Diff line number Diff line change 44import org .junit .Ignore ;
55import org .junit .Test ;
66import org .schabi .newpipe .downloader .DownloaderTestImpl ;
7+ import org .schabi .newpipe .extractor .ExtractorAsserts ;
78import org .schabi .newpipe .extractor .NewPipe ;
89import org .schabi .newpipe .extractor .exceptions .ParsingException ;
910import org .schabi .newpipe .extractor .services .peertube .extractors .PeertubePlaylistExtractor ;
@@ -51,9 +52,8 @@ public void testGetUploaderName() throws ParsingException {
5152 }
5253
5354 @ Test
54- @ Ignore ("TODO fix" )
5555 public void testGetStreamCount () throws ParsingException {
56- assertEquals ( 35 , extractor .getStreamCount ());
56+ ExtractorAsserts . assertAtLeast ( 39 , extractor .getStreamCount ());
5757 }
5858
5959 @ Test
@@ -62,7 +62,6 @@ public void testGetSubChannelUrl() throws ParsingException {
6262 }
6363
6464 @ Test
65- @ Ignore ("TODO fix" )
6665 public void testGetSubChannelName () throws ParsingException {
6766 assertEquals ("SHOCKING !" , extractor .getSubChannelName ());
6867 }
Original file line number Diff line number Diff line change @@ -94,13 +94,6 @@ public void testGetLanguageInformation() throws ParsingException {
9494 @ Override public Locale expectedLanguageInfo () { return Locale .forLanguageTag ("en" ); }
9595 @ Override public List <String > expectedTags () { return Arrays .asList ("framasoft" , "peertube" ); }
9696 @ Override public int expectedStreamSegmentsCount () { return 0 ; }
97-
98- @ Override
99- @ Test
100- @ Ignore ("TODO fix" )
101- public void testSubChannelName () throws Exception {
102- super .testSubChannelName ();
103- }
10497 }
10598
10699 @ Ignore ("TODO fix" )
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ public void testServiceId() {
4242 }
4343
4444 @ Test
45- @ Ignore ("TODO fix" )
4645 public void testName () {
4746 assertEquals ("THE PERFECT LUV TAPE®️" , extractor .getName ());
4847 }
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ public static void setUp() throws Exception {
2626 }
2727
2828 @ Test (expected = IllegalArgumentException .class )
29- @ Ignore ("TODO fix" )
3029 public void getIdWithNullAsUrl () throws ParsingException {
3130 linkHandler .fromUrl (null ).getId ();
3231 }
Original file line number Diff line number Diff line change @@ -114,7 +114,6 @@ public static void setUp() throws Exception {
114114
115115 public static class PagingTest {
116116 @ Test
117- @ Ignore ("TODO fix" )
118117 public void duplicatedItemsCheck () throws Exception {
119118 NewPipe .init (DownloaderTestImpl .getInstance ());
120119 final SearchExtractor extractor = SoundCloud .getSearchExtractor ("cirque du soleil" , singletonList (TRACKS ), "" );
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ private static String removeClientId(String url) {
2424 }
2525
2626 @ Test
27- @ Ignore ("TODO fix" )
2827 public void testRegularValues () throws Exception {
2928 assertEquals ("https://api-v2.soundcloud.com/search?q=asdf&limit=10&offset=0" ,
3029 removeClientId (SoundCloud .getSearchQHFactory ().fromQuery ("asdf" ).getUrl ()));
Original file line number Diff line number Diff line change @@ -117,7 +117,6 @@ public void testMoreRelatedItems() throws Exception {
117117 //////////////////////////////////////////////////////////////////////////*/
118118
119119 @ Test
120- @ Ignore ("TODO fix" )
121120 public void testDescription () throws Exception {
122121 assertTrue (extractor .getDescription ().contains ("Zart im Schmelz und süffig im Abgang. Ungebremster Spieltrieb" ));
123122 }
You can’t perform that action at this time.
0 commit comments