assertEquals("UL tag found", 1, visitor.getTagCount(2));
assertEquals("A tag found", 1, visitor.getTagCount(3));
}
public void testEndTags() throws Exception {
TagFindingVisitor visitor = new TagFindingVisitor(new String[] { "LI", "BODY", "UL", "A" }, true);
parser.visitAllNodesWith(visitor);
assertEquals("LI tags found", 2, visitor.getTagCount(0));
assertEquals("BODY tag found", 1, visitor.getTagCount(1));
assertEquals("UL tag found", 1, visitor.getTagCount(2));
assertEquals("A tag found", 1, visitor.getTagCount(3));
assertEquals("BODY end tag found", 1, visitor.getEndTagCount(1));
}