mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-12 21:30:33 +05:30
fix failing viewcount test
This commit is contained in:
parent
91b1efc97e
commit
09bafe0660
@ -43,6 +43,9 @@ import static org.schabi.newpipe.extractor.ServiceList.YouTube;
|
||||
*/
|
||||
public class YoutubeStreamExtractorDefaultTest {
|
||||
|
||||
/**
|
||||
* Test for {@link StreamExtractor}
|
||||
*/
|
||||
public static class AdeleHello {
|
||||
private static YoutubeStreamExtractor extractor;
|
||||
|
||||
|
@ -13,6 +13,9 @@ import static java.util.Collections.singletonList;
|
||||
import static junit.framework.TestCase.assertTrue;
|
||||
import static org.schabi.newpipe.extractor.ServiceList.YouTube;
|
||||
|
||||
/**
|
||||
* Test for {@link YoutubeSearchExtractor}
|
||||
*/
|
||||
public class YoutubeSearchCountTest {
|
||||
public static class YoutubeChannelViewCountTest extends YoutubeSearchExtractorBaseTest {
|
||||
@BeforeClass
|
||||
@ -28,7 +31,7 @@ public class YoutubeSearchCountTest {
|
||||
public void testViewCount() {
|
||||
ChannelInfoItem ci = (ChannelInfoItem) itemsPage.getItems().get(0);
|
||||
assertTrue("Count does not fit: " + Long.toString(ci.getSubscriberCount()),
|
||||
69043316 < ci.getSubscriberCount() && ci.getSubscriberCount() < 73043316);
|
||||
69043316 < ci.getSubscriberCount() && ci.getSubscriberCount() < 103043316);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,9 @@ public class YoutubeSearchExtractorDefaultTest extends YoutubeSearchExtractorBas
|
||||
|
||||
@Test
|
||||
public void testResultList_FirstElement() {
|
||||
InfoItem firstInfoItem = itemsPage.getItems().get(1);
|
||||
InfoItem firstInfoItem = itemsPage.getItems().get(0);
|
||||
if(! (firstInfoItem instanceof ChannelInfoItem))
|
||||
firstInfoItem = itemsPage.getItems().get(1);
|
||||
|
||||
// The channel should be the first item
|
||||
assertTrue(firstInfoItem instanceof ChannelInfoItem);
|
||||
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,6 @@
|
||||
#Fri Jan 18 11:51:40 CET 2019
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.2.1-all.zip
|
||||
|
Loading…
Reference in New Issue
Block a user