Skip to content

Commit d381f3b

Browse files
committed
Update avatar, banners and thumbnail methods' name and apply changes in DefaultStreamExtractorTest
1 parent 434e885 commit d381f3b

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

extractor/src/test/java/org/schabi/newpipe/extractor/services/DefaultStreamExtractorTest.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@
2929
import static org.junit.jupiter.api.Assertions.assertNotNull;
3030
import static org.junit.jupiter.api.Assertions.assertNull;
3131
import static org.junit.jupiter.api.Assertions.assertTrue;
32-
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertGreaterOrEqual;
32+
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertEmpty;
3333
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertEqualsOrderIndependent;
34+
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertGreaterOrEqual;
3435
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsSecureUrl;
3536
import static org.schabi.newpipe.extractor.ExtractorAsserts.assertIsValidUrl;
37+
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestImageCollection;
3638
import static org.schabi.newpipe.extractor.services.DefaultTests.defaultTestListOfItems;
3739
import static org.schabi.newpipe.extractor.stream.StreamExtractor.UNKNOWN_SUBSCRIBER_COUNT;
3840

@@ -98,8 +100,8 @@ public void testUploaderUrl() throws Exception {
98100

99101
@Test
100102
@Override
101-
public void testUploaderAvatarUrl() throws Exception {
102-
assertIsSecureUrl(extractor().getUploaderAvatarUrl());
103+
public void testUploaderAvatars() throws Exception {
104+
defaultTestImageCollection(extractor().getUploaderAvatars());
103105
}
104106

105107
@Test
@@ -137,20 +139,20 @@ public void testSubChannelUrl() throws Exception {
137139

138140
@Test
139141
@Override
140-
public void testSubChannelAvatarUrl() throws Exception {
142+
public void testSubChannelAvatars() throws Exception {
141143
if (expectedSubChannelName().isEmpty() && expectedSubChannelUrl().isEmpty()) {
142144
// this stream has no subchannel
143-
assertEquals("", extractor().getSubChannelAvatarUrl());
145+
assertEmpty(extractor().getSubChannelAvatars());
144146
} else {
145147
// this stream has a subchannel
146-
assertIsSecureUrl(extractor().getSubChannelAvatarUrl());
148+
defaultTestImageCollection(extractor().getSubChannelAvatars());
147149
}
148150
}
149151

150152
@Test
151153
@Override
152-
public void testThumbnailUrl() throws Exception {
153-
assertIsSecureUrl(extractor().getThumbnailUrl());
154+
public void testThumbnails() throws Exception {
155+
defaultTestImageCollection(extractor().getThumbnails());
154156
}
155157

156158
@Test

0 commit comments

Comments
 (0)