mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-29 00:10:35 +05:30
Update avatar, banners and thumbnail methods' name and apply changes in DefaultStreamExtractorTest
This commit is contained in:
parent
434e885708
commit
d381f3b70b
@ -29,10 +29,12 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
|
|||||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertGreaterOrEqual;
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertEmpty;
|
||||||
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertEqualsOrderIndependent;
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertEqualsOrderIndependent;
|
||||||
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertGreaterOrEqual;
|
||||||
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsSecureUrl;
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsSecureUrl;
|
||||||
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsValidUrl;
|
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsValidUrl;
|
||||||
|
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestImageCollection;
|
||||||
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestListOfItems;
|
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestListOfItems;
|
||||||
import static org.schabi.newpipe.extractor.stream.StreamExtractor.UNKNOWN_SUBSCRIBER_COUNT;
|
import static org.schabi.newpipe.extractor.stream.StreamExtractor.UNKNOWN_SUBSCRIBER_COUNT;
|
||||||
|
|
||||||
@ -98,8 +100,8 @@ public abstract class DefaultStreamExtractorTest extends DefaultExtractorTest<St
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Override
|
@Override
|
||||||
public void testUploaderAvatarUrl() throws Exception {
|
public void testUploaderAvatars() throws Exception {
|
||||||
assertIsSecureUrl(extractor().getUploaderAvatarUrl());
|
defaultTestImageCollection(extractor().getUploaderAvatars());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -137,20 +139,20 @@ public abstract class DefaultStreamExtractorTest extends DefaultExtractorTest<St
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Override
|
@Override
|
||||||
public void testSubChannelAvatarUrl() throws Exception {
|
public void testSubChannelAvatars() throws Exception {
|
||||||
if (expectedSubChannelName().isEmpty() && expectedSubChannelUrl().isEmpty()) {
|
if (expectedSubChannelName().isEmpty() && expectedSubChannelUrl().isEmpty()) {
|
||||||
// this stream has no subchannel
|
// this stream has no subchannel
|
||||||
assertEquals("", extractor().getSubChannelAvatarUrl());
|
assertEmpty(extractor().getSubChannelAvatars());
|
||||||
} else {
|
} else {
|
||||||
// this stream has a subchannel
|
// this stream has a subchannel
|
||||||
assertIsSecureUrl(extractor().getSubChannelAvatarUrl());
|
defaultTestImageCollection(extractor().getSubChannelAvatars());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Override
|
@Override
|
||||||
public void testThumbnailUrl() throws Exception {
|
public void testThumbnails() throws Exception {
|
||||||
assertIsSecureUrl(extractor().getThumbnailUrl());
|
defaultTestImageCollection(extractor().getThumbnails());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user