@@ -85,4 +85,29 @@ void lockupViewModelPremiere()
8585 () -> assertFalse (extractor .isShortFormContent ())
8686 );
8787 }
88+
89+ @ Test
90+ void emptyTitle () throws FileNotFoundException , JsonParserException {
91+ final var json = JsonParser .object ().from (new FileInputStream (getMockPath (
92+ YoutubeStreamInfoItemTest .class , "emptyTitle" ) + ".json" ));
93+ final var timeAgoParser = TimeAgoPatternsManager .getTimeAgoParserFor (Localization .DEFAULT );
94+ final var extractor = new YoutubeStreamInfoItemExtractor (json , timeAgoParser );
95+ assertAll (
96+ () -> assertEquals (StreamType .VIDEO_STREAM , extractor .getStreamType ()),
97+ () -> assertFalse (extractor .isAd ()),
98+ () -> assertEquals ("https://www.youtube.com/watch?v=nc1kN8ZSfGQ" , extractor .getUrl ()),
99+ () -> assertEquals ("" , extractor .getName ()),
100+ () -> assertEquals (39 , extractor .getDuration ()),
101+ () -> assertEquals ("hyper" , extractor .getUploaderName ()),
102+ () -> assertEquals ("https://www.youtube.com/channel/UCSezUnbvCLYBXuUlPcXU_QQ" , extractor .getUploaderUrl ()),
103+ () -> assertFalse (extractor .getUploaderAvatars ().isEmpty ()),
104+ () -> assertTrue (extractor .isUploaderVerified ()),
105+ () -> assertEquals ("8 years ago" , extractor .getTextualUploadDate ()),
106+ () -> assertNotNull (extractor .getUploadDate ()),
107+ () -> assertTrue (extractor .getViewCount () >= 1318193 ),
108+ () -> assertFalse (extractor .getThumbnails ().isEmpty ()),
109+ () -> assertNull (extractor .getShortDescription ()),
110+ () -> assertFalse (extractor .isShortFormContent ())
111+ );
112+ }
88113}
0 commit comments