Author: aparfonov
Date: 2009-10-21 04:41:00 -0400 (Wed, 21 Oct 2009)
New Revision: 320
Modified:
jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java
Log:
EXOJCR-197 : Add JUnit that shows error.
Modified:
jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java
===================================================================
---
jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java 2009-10-20
11:39:35 UTC (rev 319)
+++
jcr/trunk/component/core/src/test/java/org/exoplatform/services/jcr/impl/core/TestSessionDataManager.java 2009-10-21
08:41:00 UTC (rev 320)
@@ -34,6 +34,8 @@
import java.util.ArrayList;
import java.util.List;
+import javax.jcr.ItemNotFoundException;
+import javax.jcr.Node;
import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
@@ -334,4 +336,25 @@
assertNotNull(modificationManager.getItemData(QPath.makeChildPath(((NodeImpl)root).getData().getQPath(),
new InternalQName("", "testgetitemNode"))));
}
+
+ public void testRemove() throws Exception
+ {
+ Node n = session.getRootNode().addNode("node",
"nt:unstructured");
+ n.addMixin("mix:referenceable");
+ session.save();
+ String uuid = n.getUUID();
+ Node p = n.getParent();
+ n.remove();
+ p.save();
+ try
+ {
+ modificationManager.getItemByIdentifier(uuid, true);
+// session.getNodeByUUID(uuid);
+ fail("Node must be removed.");
+ }
+ catch(ItemNotFoundException e)
+ {
+
+ }
+ }
}
Show replies by date