Using Class instead of HashMap, removed downloadSubtitles method
This commit is contained in:
@@ -105,6 +105,6 @@ public class SoundcloudStreamExtractorDefaultTest {
|
||||
|
||||
@Test
|
||||
public void testGetSubtitles() throws IOException, ExtractionException, JsonParserException {
|
||||
assertTrue(extractor.getSubtitlesList() != null);
|
||||
assertTrue(extractor.getSubtitles() != null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -153,17 +153,7 @@ public class YoutubeStreamExtractorDefaultTest {
|
||||
|
||||
@Test
|
||||
public void testGetSubtitlesList() throws IOException, ExtractionException, JsonParserException {
|
||||
assertTrue(extractor.getSubtitlesList() != null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDownloadSubtitles() throws Exception {
|
||||
try {
|
||||
extractor.downloadSubtitles(extractor.getSubtitlesList().get("en")[0]);
|
||||
// Video has no subtitles!
|
||||
assert false;
|
||||
} catch (Exception e) {
|
||||
assert true;
|
||||
}
|
||||
// Video (/view?v=YQHsXMglC9A) set in the setUp() method has no captions => null
|
||||
assertTrue(extractor.getSubtitles() != null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,11 +107,6 @@ public class YoutubeStreamExtractorRestrictedTest {
|
||||
|
||||
@Test
|
||||
public void testGetSubtitlesList() throws IOException, ExtractionException, JsonParserException {
|
||||
assertTrue(extractor.getSubtitlesList() != null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDownloadSubtitles() throws Exception {
|
||||
assertTrue(extractor.downloadSubtitles("https://youtu.be/FmG385_uUys?t=174") != null);
|
||||
assertTrue(extractor.getSubtitles() != null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user