@Test public void testChannelParsing() throws IOException, XmlTvParser.XmlTvParseException { String testXmlFile = "xmltv.xml"; InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(testXmlFile); XmlTvParser.TvListing listings = XmlTvParser.parse(inputStream); assertEquals(4, listings.getChannels().size()); assertEquals("Creative Commons", listings.getChannels().get(1).getDisplayName()); assertEquals("2-3", listings.getChannels().get(2).getDisplayNumber()); assertEquals("App Link Text 1", listings.getChannels().get(2).getAppLinkText()); assertNull(listings.getChannels().get(0).getChannelLogo()); assertTrue(listings.getChannels().get(3).getChannelLogo() .contains("storage.googleapis.com/android-tv/images/mpeg_dash.png")); }
public static TvListing parse(@NonNull InputStream inputStream) throws XmlTvParseException { return parse(inputStream, Xml.newPullParser()); }
XmlTvParser { public static TvListing parse(@NonNull InputStream inputStream) throws XmlTvParseException { return parse(inputStream, Xml.newPullParser()); } }
XmlTvParser { public static TvListing parse(@NonNull InputStream inputStream) throws XmlTvParseException { return parse(inputStream, Xml.newPullParser()); } private  XmlTvParser(); }
XmlTvParser { public static TvListing parse(@NonNull InputStream inputStream) throws XmlTvParseException { return parse(inputStream, Xml.newPullParser()); } private  XmlTvParser(); static TvListing parse(@NonNull InputStream inputStream); }
XmlTvParser { public static TvListing parse(@NonNull InputStream inputStream) throws XmlTvParseException { return parse(inputStream, Xml.newPullParser()); } private  XmlTvParser(); static TvListing parse(@NonNull InputStream inputStream);  }