@Test public void nameAndPathFromLoad() { XMLDocument doc = db.createFolder("/top").documents().load(Name.create(db, "foo"), Source.xml("<root/>")); assertEquals("foo", doc.name()); assertEquals("/top/foo", doc.path()); }
@Test public void nameAndPathFromCreate() { XMLDocument doc = db.createFolder("/top") .documents() .build(Name.create(db, "foo")) .elem("root") .end("root") .commit(); assertEquals("foo", doc.name()); assertEquals("/top/foo", doc.path()); }