File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .schabi .newpipe .extractor .services .youtube ;
22
3- import com .grack .nanojson .JsonParserException ;
43import org .junit .Before ;
54import org .junit .Ignore ;
65import org .junit .Test ;
Original file line number Diff line number Diff line change 3131import static org .junit .Assert .assertEquals ;
3232import static org .junit .Assert .assertNotNull ;
3333import static org .junit .Assert .assertTrue ;
34+ import static org .schabi .newpipe .extractor .ExtractorAsserts .assertEmptyErrors ;
3435import static org .schabi .newpipe .extractor .ServiceList .YouTube ;
3536
3637
@@ -68,21 +69,12 @@ public void testId() throws Exception {
6869 @ Test
6970 public void testGetStreams () throws Exception {
7071 StreamInfoItemCollector collector = extractor .getStreams ();
71- if (!collector .getErrors ().isEmpty ()) {
72- System .err .println ("----------" );
73- for (Throwable e : collector .getErrors ()) {
74- e .printStackTrace ();
75- System .err .println ("----------" );
76- }
77- }
78- assertTrue ("no streams are received" ,
79- !collector .getItemList ().isEmpty ()
80- && collector .getErrors ().isEmpty ());
72+ assertTrue ("no streams are received" , collector .getItemList ().isEmpty ());
8173 }
8274
8375 @ Test
8476 public void testGetStreamsErrors () throws Exception {
85- assertTrue ("errors during stream list extraction" , extractor .getStreams ().getErrors (). isEmpty ());
77+ assertEmptyErrors ("errors during stream list extraction" , extractor .getStreams ().getErrors ());
8678 }
8779
8880 @ Test
You can’t perform that action at this time.
0 commit comments