Exemplo n.º 1
0
 @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());
 }
Exemplo n.º 2
0
 @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());
 }