fixed viewcount failure
This commit is contained in:
parent
5d8f75beb4
commit
3441aceba3
7 changed files with 21 additions and 10 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue