Skip to content

Commit 2c387ce

Browse files
litetexStypox
authored andcommitted
Remove additional boiler
1 parent 71c5414 commit 2c387ce

10 files changed

Lines changed: 469 additions & 684 deletions

extractor/src/test/java/org/schabi/newpipe/extractor/services/media_ccc/MediaCCCRecentListExtractorTest.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,27 @@
66
import static org.schabi.newpipe.extractor.ServiceList.MediaCCC;
77
import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty;
88

9-
import org.junit.jupiter.api.BeforeAll;
109
import org.junit.jupiter.api.Test;
1110
import org.junit.jupiter.api.function.Executable;
1211
import org.schabi.newpipe.extractor.InitNewPipeTest;
1312
import org.schabi.newpipe.extractor.kiosk.KioskExtractor;
13+
import org.schabi.newpipe.extractor.services.DefaultSimpleExtractorTest;
1414
import org.schabi.newpipe.extractor.stream.StreamInfoItem;
1515

1616
import java.util.List;
1717
import java.util.stream.Stream;
1818

19-
public class MediaCCCRecentListExtractorTest implements InitNewPipeTest {
20-
private KioskExtractor extractor;
19+
public class MediaCCCRecentListExtractorTest extends DefaultSimpleExtractorTest<KioskExtractor>
20+
implements InitNewPipeTest {
2121

2222
@Override
23-
@BeforeAll
24-
public void setUp() throws Exception {
25-
InitNewPipeTest.super.setUp();
26-
extractor = MediaCCC.getKioskList().getExtractorById("recent", null);
27-
extractor.fetchPage();
23+
protected KioskExtractor createExtractor() throws Exception {
24+
return MediaCCC.getKioskList().getExtractorById("recent", null);
2825
}
2926

3027
@Test
3128
void testStreamList() throws Exception {
32-
final List<StreamInfoItem> items = extractor.getInitialPage().getItems();
29+
final List<StreamInfoItem> items = extractor().getInitialPage().getItems();
3330
assertFalse(items.isEmpty(), "No items returned");
3431

3532
assertAll(items.stream().flatMap(this::getAllConditionsForItem));

0 commit comments

Comments
 (0)