Using Class instead of HashMap, removed downloadSubtitles method

This commit is contained in:
tonakriz
2017-11-23 11:47:08 +01:00
parent 72f9ac223e
commit f09b4e68d0
4 changed files with 9 additions and 21 deletions

View File

@@ -105,6 +105,6 @@ public class SoundcloudStreamExtractorDefaultTest {
@Test
public void testGetSubtitles() throws IOException, ExtractionException, JsonParserException {
assertTrue(extractor.getSubtitlesList() != null);
assertTrue(extractor.getSubtitles() != null);
}
}

View File

@@ -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);
}
}

View File

@@ -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);
}
}