@TestTargetNew(
level = TestLevel.COMPLETE,
method = "endElement",
args = { String.class }
)
public void testEndElement() {
AttributeListImpl atts = new AttributeListImpl();
atts.addAttribute("john:doe", "int", "42");
try {
adapter.startDocument();
adapter.startElement("foo:bar", atts);
adapter.endElement("foo:bar");
} catch (SAXException e) {
throw new RuntimeException("Unexpected exception", e);
}
assertEquals("endElement", logger.getMethod());
assertEquals(new String[] { "", "", "foo:bar" }, logger.getArgs());
}
ParserAdapterTest.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:In-the-Box-Fork
作者:
评论列表
文章目录