public void testRootAsCollection() {
assertXPathValue(context, ".[1]/string", "string");
}
public void testCreatePath() {
context = JXPathContext.newContext(new TestBean());
context.setFactory(new TestMixedModelFactory());
TestBean bean = (TestBean) context.getContextBean();
bean.setMap(null);
assertXPathCreatePath(
context,
"/map[@name='TestKey5']/nestedBean/int",
new Integer(1),
"/map[@name='TestKey5']/nestedBean/int");
bean.setMap(null);
assertXPathCreatePath(
context,
"/map[@name='TestKey5']/beans[2]/int",
new Integer(1),
"/map[@name='TestKey5']/beans[2]/int");