catch(NoSuchMethodError ex)
{
return;
}
Node root = ((Document) result.getNode()).getDocumentElement();
JXPathContext ctx = JXPathContext.newContext(root);
assertEquals("Wrong name of root element", "database", root.getNodeName());
assertEquals("Wrong number of children of root", 1, ctx.selectNodes(
"/*").size());
assertEquals("Wrong number of tables", 2, ctx.selectNodes(
"/tables/table").size());
assertEquals("Wrong name of first table", "users", ctx
.getValue("/tables/table[1]/name"));
assertEquals("Wrong number of fields in first table", 5, ctx
.selectNodes("/tables/table[1]/fields/field").size());
assertEquals("Wrong attribute value", "system", ctx
.getValue("/tables/table[1]/@tableType"));
}