mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-10-25 12:27:38 +00:00
fixed viewcount failure
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package org.schabi.newpipe.services.youtube;
|
||||
package org.schabi.newpipe.extractor.youtube;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
@@ -82,9 +82,16 @@ public class YoutubeSearchEngineTest extends AndroidTestCase {
|
||||
}
|
||||
|
||||
public void testViewCount() {
|
||||
/*
|
||||
for(VideoPreviewInfo i : result.resultList) {
|
||||
assertTrue(Long.toString(i.view_count), i.view_count != -1);
|
||||
}
|
||||
*/
|
||||
// that specific link used for this test, there are no videos with less
|
||||
// than 10.000 views, so we can test against that.
|
||||
for(VideoPreviewInfo i : result.resultList) {
|
||||
assertTrue(Long.toString(i.view_count), i.view_count >= 10000);
|
||||
}
|
||||
}
|
||||
|
||||
public void testIfSuggestionsAreReplied() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.schabi.newpipe.services.youtube;
|
||||
package org.schabi.newpipe.extractor.youtube;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
@@ -70,8 +70,9 @@ public class YoutubeStreamExtractorDefaultTest extends AndroidTestCase {
|
||||
assertTrue(extractor.getLength() > 0);
|
||||
}
|
||||
|
||||
public void testGetViews() throws ParsingException {
|
||||
assertTrue(extractor.getLength() > 0);
|
||||
public void testGetViewCount() throws ParsingException {
|
||||
assertTrue(Long.toString(extractor.getViewCount()),
|
||||
extractor.getViewCount() > /* specific to that video */ 1224000074);
|
||||
}
|
||||
|
||||
public void testGetUploadDate() throws ParsingException {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.schabi.newpipe.services.youtube;
|
||||
package org.schabi.newpipe.extractor.youtube;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user