Skip to content

Commit

Permalink
add tests for uploader verified in baseplaylistextractor and basechan…
Browse files Browse the repository at this point in the history
…nelextractor
  • Loading branch information
B0pol committed Jan 22, 2021
1 parent ef0daec commit 0fb4bcd
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ public interface BaseChannelExtractorTest extends BaseListExtractorTest {
void testBannerUrl() throws Exception;
void testFeedUrl() throws Exception;
void testSubscriberCount() throws Exception;
void testVerified() throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ public interface BasePlaylistExtractorTest extends BaseListExtractorTest {
void testUploaderName() throws Exception;
void testUploaderAvatarUrl() throws Exception;
void testStreamCount() throws Exception;
void testUploaderVerified() throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ public void testFeedUrl() throws ParsingException {
public void testSubscriberCount() throws ParsingException {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 500);
}

@Override
public void testVerified() throws Exception {
assertFalse(extractor.getVerified());
}
}

public static class FreeSoftwareFoundation implements BaseChannelExtractorTest {
Expand Down Expand Up @@ -201,5 +206,10 @@ public void testFeedUrl() throws ParsingException {
public void testSubscriberCount() throws ParsingException {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 100);
}

@Override
public void testVerified() throws Exception {
assertFalse(extractor.getVerified());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ public void testFeedUrl() throws ParsingException {
public void testSubscriberCount() throws ParsingException {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 230);
}

@Override
public void testVerified() throws Exception {
assertFalse(extractor.getVerified());
}
}

public static class ChatSceptique implements BaseChannelExtractorTest {
Expand Down Expand Up @@ -231,5 +236,10 @@ public void testFeedUrl() throws ParsingException {
public void testSubscriberCount() throws ParsingException {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 700);
}

@Override
public void testVerified() throws Exception {
assertFalse(extractor.getVerified());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public void testSubscriberCount() {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 1e6);
}

@Test
public void testIsVerified() throws ParsingException {
@Override
public void testVerified() throws Exception {
assertTrue(extractor.getVerified());
}
}
Expand Down Expand Up @@ -201,8 +201,8 @@ public void testSubscriberCount() {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 2e6);
}

@Test
public void testIsVerified() throws ParsingException {
@Override
public void testVerified() throws Exception {
assertTrue(extractor.getVerified());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ public void testUploaderAvatarUrl() {
public void testStreamCount() {
assertTrue("Stream count does not fit: " + extractor.getStreamCount(), extractor.getStreamCount() >= 10);
}

@Override
public void testUploaderVerified() throws Exception {
assertTrue(extractor.getUploaderVerified());
}
}

public static class RandomHouseMusic implements BasePlaylistExtractorTest {
Expand Down Expand Up @@ -204,6 +209,11 @@ public void testUploaderAvatarUrl() {
public void testStreamCount() {
assertTrue("Stream count does not fit: " + extractor.getStreamCount(), extractor.getStreamCount() >= 10);
}

@Override
public void testUploaderVerified() throws Exception {
assertFalse(extractor.getUploaderVerified());
}
}

public static class EDMxxx implements BasePlaylistExtractorTest {
Expand Down Expand Up @@ -311,6 +321,11 @@ public void testUploaderAvatarUrl() {
public void testStreamCount() {
assertTrue("Stream count does not fit: " + extractor.getStreamCount(), extractor.getStreamCount() >= 370);
}

@Override
public void testUploaderVerified() throws Exception {
assertFalse(extractor.getUploaderVerified());
}
}

public static class SmallPlaylist implements BasePlaylistExtractorTest {
Expand Down Expand Up @@ -410,5 +425,10 @@ public void testUploaderAvatarUrl() {
public void testStreamCount() {
assertEquals(2, extractor.getStreamCount());
}

@Override
public void testUploaderVerified() throws Exception {
assertFalse(extractor.getUploaderVerified());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ public void testSubscriberCount() throws Exception {
assertTrue("Subscriber count too small", extractor.getSubscriberCount() >= 4e6);
}

@Test
public void testIsVerified() throws ParsingException {
@Override
public void testVerified() throws Exception {
assertTrue(extractor.getVerified());
}

Expand Down Expand Up @@ -243,8 +243,8 @@ public void testSubscriberCount() throws Exception {
assertTrue("Subscriber count too small", extractor.getSubscriberCount() >= 10e6);
}

@Test
public void testIsVerified() throws ParsingException {
@Override
public void testVerified() throws Exception {
assertTrue(extractor.getVerified());
}

Expand Down Expand Up @@ -351,8 +351,8 @@ public void testSubscriberCount() throws Exception {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 5e6);
}

@Test
public void testIsVerified() throws ParsingException {
@Override
public void testVerified() throws Exception {
assertTrue(extractor.getVerified());
}
}
Expand Down Expand Up @@ -445,8 +445,8 @@ public void testSubscriberCount() throws Exception {
assertTrue("Wrong subscriber count", extractor.getSubscriberCount() >= 5e5);
}

@Test
public void testIsVerified() throws ParsingException {
@Override
public void testVerified() throws Exception {
assertTrue(extractor.getVerified());
}
}
Expand Down Expand Up @@ -546,8 +546,8 @@ public void testSubscriberCount() throws Exception {
assertTrue("Wrong subscriber count: " + subscribers, subscribers >= 50);
}

@Test
public void testIsVerified() throws ParsingException {
@Override
public void testVerified() throws Exception {
assertFalse(extractor.getVerified());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ public void testUploaderAvatarUrl() throws Exception {
public void testStreamCount() throws Exception {
assertTrue("Error in the streams count", extractor.getStreamCount() > 100);
}

@Override
public void testUploaderVerified() throws Exception {
assertFalse(extractor.getUploaderVerified());
}
}

public static class HugePlaylist implements BasePlaylistExtractorTest {
Expand Down Expand Up @@ -261,6 +266,11 @@ public void testUploaderAvatarUrl() throws Exception {
public void testStreamCount() throws Exception {
assertTrue("Error in the streams count", extractor.getStreamCount() > 100);
}

@Override
public void testUploaderVerified() throws Exception {
assertTrue(extractor.getUploaderVerified());
}
}

public static class LearningPlaylist implements BasePlaylistExtractorTest {
Expand Down Expand Up @@ -359,6 +369,11 @@ public void testUploaderAvatarUrl() throws Exception {
public void testStreamCount() throws Exception {
assertTrue("Error in the streams count", extractor.getStreamCount() > 40);
}

@Override
public void testUploaderVerified() throws Exception {
assertTrue(extractor.getUploaderVerified());
}
}

public static class ContinuationsTests {
Expand Down

0 comments on commit 0fb4bcd

Please sign in to comment.