11package org .schabi .newpipe .extractor .services .media_ccc ;
22
3+ import static org .junit .jupiter .api .Assertions .assertAll ;
4+ import static org .junit .jupiter .api .Assertions .assertFalse ;
5+ import static org .schabi .newpipe .extractor .ExtractorAsserts .assertGreater ;
6+ import static org .schabi .newpipe .extractor .ServiceList .MediaCCC ;
7+ import static org .schabi .newpipe .extractor .utils .Utils .isNullOrEmpty ;
8+
39import org .junit .jupiter .api .BeforeAll ;
410import org .junit .jupiter .api .Test ;
511import org .junit .jupiter .api .function .Executable ;
814import org .schabi .newpipe .extractor .kiosk .KioskExtractor ;
915import org .schabi .newpipe .extractor .stream .StreamInfoItem ;
1016
11- import java .util .ArrayList ;
1217import java .util .List ;
13- import java .util .stream .Collectors ;
1418import java .util .stream .Stream ;
1519
16- import static org .junit .jupiter .api .Assertions .*;
17- import static org .schabi .newpipe .extractor .ServiceList .MediaCCC ;
18- import static org .schabi .newpipe .extractor .utils .Utils .isNullOrEmpty ;
19-
2020public class MediaCCCRecentListExtractorTest {
2121 private static KioskExtractor extractor ;
2222
@@ -37,9 +37,14 @@ void testStreamList() throws Exception {
3737
3838 private Stream <Executable > getAllConditionsForItem (final StreamInfoItem item ) {
3939 return Stream .of (
40- () -> assertFalse (isNullOrEmpty (item .getName ())),
41- () -> assertTrue (item .getDuration () > 0 ,
42- "Duration[=" + item .getDuration () + "] of " + item + "is <= 0" )
40+ () -> assertFalse (
41+ isNullOrEmpty (item .getName ()),
42+ "Name=[" + item .getName () + "] of " + item + " is empty or null"
43+ ),
44+ () -> assertGreater (0 ,
45+ item .getDuration (),
46+ "Duration[=" + item .getDuration () + "] of " + item + " is <= 0"
47+ )
4348 );
4449 }
4550}
0 commit comments