Addede fetching subtitles for youtube and its tests
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.schabi.newpipe.extractor.services.soundcloud;
|
||||
|
||||
import com.grack.nanojson.JsonParserException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.schabi.newpipe.Downloader;
|
||||
@@ -101,4 +102,9 @@ public class SoundcloudStreamExtractorDefaultTest {
|
||||
assertFalse(relatedVideos.getItemList().isEmpty());
|
||||
assertTrue(relatedVideos.getErrors().isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetSubtitles() throws IOException, ExtractionException, JsonParserException {
|
||||
assertTrue(extractor.getSubtitles() != null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.schabi.newpipe.extractor.services.youtube;
|
||||
|
||||
import com.grack.nanojson.JsonParserException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.schabi.newpipe.Downloader;
|
||||
@@ -12,6 +13,7 @@ import org.schabi.newpipe.extractor.stream.StreamType;
|
||||
import org.schabi.newpipe.extractor.stream.VideoStream;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.schabi.newpipe.extractor.ServiceList.YouTube;
|
||||
@@ -148,4 +150,9 @@ public class YoutubeStreamExtractorDefaultTest {
|
||||
}
|
||||
assertTrue(relatedVideos.getErrors().isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetSubtitles() throws IOException, ExtractionException, JsonParserException {
|
||||
assertTrue(extractor.getSubtitles() != null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.schabi.newpipe.extractor.services.youtube;
|
||||
|
||||
import com.grack.nanojson.JsonParserException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.schabi.newpipe.Downloader;
|
||||
@@ -103,4 +104,9 @@ public class YoutubeStreamExtractorRestrictedTest {
|
||||
0 <= s.format && s.format <= 4);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetSubtitles() throws IOException, ExtractionException, JsonParserException {
|
||||
assertTrue(extractor.getSubtitles() != null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user