Esempio n. 1
0
 @Test
 public void delete1() {
   Folder c1 = db.createFolder("/c1");
   XMLDocument doc =
       c1.documents().build(Name.create(db, "original")).elem("test").end("test").commit();
   doc.delete();
   assertEquals(0, c1.documents().size());
 }
Esempio n. 2
0
 @Test
 public void delete2() {
   Folder c1 = db.createFolder("/c1");
   XMLDocument doc1 =
       c1.documents()
           .build(Name.create(db, "doc1"))
           .elem("test")
           .attr("xml:id", "a")
           .end("test")
           .commit();
   XMLDocument doc2 =
       c1.documents()
           .build(Name.create(db, "doc2"))
           .elem("test2")
           .attr("xml:id", "b")
           .end("test2")
           .commit();
   doc1.delete();
   doc2.delete();
   assertEquals(0, c1.documents().size());
 }