RSS20Parser extends RSS094Parser { @Override public boolean isMyType(final Document document) { return rootElementMatches(document) && (versionMatches(document) || versionAbsent(document)); } RSS20Parser(); protected  RSS20Parser(final String type); @Override boolean isMyType(final Document document);  }
@Test public void testIsMyType() { document.setRootElement(new Element("rss").setAttribute("version", "2.0")); assertTrue(parser.isMyType(document)); }
@Test public void testIsMyTypeNotMyType() { document.setRootElement(new Element("rss").setAttribute("version", "1.0")); assertFalse(parser.isMyType(document)); }
@Test public void testIsMyTypeVersionWithSpaces() { document.setRootElement(new Element("rss").setAttribute("version", " 2.0 ")); assertTrue(parser.isMyType(document)); }
@Test public void testIsMyTypeVersionWithTrailingText() { document.setRootElement(new Element("rss").setAttribute("version", "2.0test")); assertTrue(parser.isMyType(document)); }
@Test public void testIsMyTypeVersionAbsent() { document.setRootElement(new Element("rss")); assertTrue(parser.isMyType(document)); }