2020 * along with NewPipe Extractor. If not, see <http://www.gnu.org/licenses/>.
2121 */
2222
23+ import static org .junit .jupiter .api .Assertions .assertEquals ;
2324import static org .junit .jupiter .api .Assertions .assertFalse ;
24- import static org .junit .jupiter .api .Assertions .assertTrue ;
2525import static org .schabi .newpipe .extractor .ServiceList .YouTube ;
2626
2727import org .junit .jupiter .api .BeforeAll ;
2828import org .junit .jupiter .api .Test ;
2929import org .schabi .newpipe .extractor .kiosk .KioskInfo ;
3030import org .schabi .newpipe .extractor .linkhandler .LinkHandlerFactory ;
31+ import org .schabi .newpipe .extractor .services .youtube .linkHandler .YoutubeLiveLinkHandlerFactory ;
3132
3233/**
3334 * Test for {@link KioskInfo}
@@ -41,9 +42,11 @@ class YoutubeTrendingKioskInfoTest implements InitYoutubeTest {
4142 public void setUp () throws Exception {
4243 InitYoutubeTest .super .setUp ();
4344
44- final LinkHandlerFactory linkHandlerFactory = YouTube .getKioskList ().getListLinkHandlerFactoryByType ("Trending" );
45+ final LinkHandlerFactory linkHandlerFactory = YouTube .getKioskList ()
46+ .getListLinkHandlerFactoryByType (YoutubeLiveLinkHandlerFactory .KIOSK_ID );
4547
46- kioskInfo = KioskInfo .getInfo (YouTube , linkHandlerFactory .fromId ("Trending" ).getUrl ());
48+ kioskInfo = KioskInfo .getInfo (YouTube ,
49+ linkHandlerFactory .fromId (YoutubeLiveLinkHandlerFactory .KIOSK_ID ).getUrl ());
4750 }
4851
4952 @ Test
@@ -53,8 +56,7 @@ void getStreams() {
5356
5457 @ Test
5558 void getId () {
56- assertTrue (kioskInfo .getId ().equals ("Trending" )
57- || kioskInfo .getId ().equals ("Trends" ));
59+ assertEquals (YoutubeLiveLinkHandlerFactory .KIOSK_ID , kioskInfo .getId ());
5860 }
5961
6062 @ Test
0 commit comments