jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1214710 - /jackrabbit/sandbox/jackrabbit-microkernel/src/test/java/org/apache/jackrabbit/RepositoryTest.java
Date Thu, 15 Dec 2011 11:31:23 GMT
Author: mduerig
Date: Thu Dec 15 11:31:23 2011
New Revision: 1214710

URL: http://svn.apache.org/viewvc?rev=1214710&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
Add test case for live objects

Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/test/java/org/apache/jackrabbit/RepositoryTest.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/test/java/org/apache/jackrabbit/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/test/java/org/apache/jackrabbit/RepositoryTest.java?rev=1214710&r1=1214709&r2=1214710&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/test/java/org/apache/jackrabbit/RepositoryTest.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/test/java/org/apache/jackrabbit/RepositoryTest.java
Thu Dec 15 11:31:23 2011
@@ -1145,6 +1145,37 @@ public class RepositoryTest {
     }
 
     @Test
+    public void liveNodes() throws RepositoryException {
+        Session session = getRepository().login();
+        try {
+            Node n1 = (Node) session.getItem(TEST_PATH);
+            Node n2 = (Node) session.getItem(TEST_PATH);
+
+            Node c1 = n1.addNode("c1");
+            Node c2 = n2.addNode("c2");
+            assertTrue(n1.hasNode("c1"));
+            assertTrue(n1.hasNode("c2"));
+            assertTrue(n2.hasNode("c1"));
+            assertTrue(n2.hasNode("c2"));
+
+            c1.remove();
+            assertFalse(n1.hasNode("c1"));
+            assertTrue(n1.hasNode("c2"));
+            assertFalse(n2.hasNode("c1"));
+            assertTrue(n2.hasNode("c2"));
+
+            c2.remove();
+            assertFalse(n1.hasNode("c1"));
+            assertFalse(n1.hasNode("c2"));
+            assertFalse(n2.hasNode("c1"));
+            assertFalse(n2.hasNode("c2"));
+        }
+        finally {
+            session.logout();
+        }
+    }
+
+    @Test
     @Ignore // todo implement node type support
     public void setPrimaryType() throws RepositoryException {
         Node testNode = getNode(TEST_PATH);



Mime
View raw message