Adress the last requested changes + update YoutubeCommentsExtractor mocks

This commit is contained in:
TiA4f8R
2021-07-09 18:23:46 +02:00
parent 2320aecb7c
commit 7753556e66
22 changed files with 157 additions and 144 deletions

View File

@@ -27,7 +27,7 @@ public class YoutubeParsingHelperTest {
@Test
public void testAreHardcodedClientVersionAndKeyValid() throws IOException, ExtractionException {
assertTrue("Hardcoded client version and key are not valid anymore",
YoutubeParsingHelper.areHardcodedClientVersionAndKeyValid());
YoutubeParsingHelper.areHardcodedClientVersionAndKeyValid().orElse(false));
}
@Test
@@ -44,7 +44,7 @@ public class YoutubeParsingHelperTest {
}
@Test
public void testConvertFromGoogleCacheUrl() throws ParsingException {
public void testConvertFromGoogleCacheUrl() {
assertEquals("https://mohfw.gov.in/",
YoutubeParsingHelper.extractCachedUrlIfNeeded("https://webcache.googleusercontent.com/search?q=cache:https://mohfw.gov.in/"));
assertEquals("https://www.infektionsschutz.de/coronavirus-sars-cov-2.html",