jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r699265 - in /jackrabbit/trunk/jackrabbit-core: pom.xml src/test/java/org/apache/jackrabbit/core/ShareableNodeTest.java
Date Fri, 26 Sep 2008 10:58:55 GMT
Author: reschke
Date: Fri Sep 26 03:58:55 2008
New Revision: 699265

URL: http://svn.apache.org/viewvc?rev=699265&view=rev
Log:
JCR-1773: add test case for getPath on shared nodes, for now marked as known issue

Modified:
    jackrabbit/trunk/jackrabbit-core/pom.xml
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ShareableNodeTest.java

Modified: jackrabbit/trunk/jackrabbit-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/pom.xml?rev=699265&r1=699264&r2=699265&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-core/pom.xml Fri Sep 26 03:58:55 2008
@@ -112,6 +112,7 @@
               <value>
                 org.apache.jackrabbit.core.xml.DocumentViewTest#testMultiValue
                 org.apache.jackrabbit.value.BinaryValueTest#testBinaryValueEquals
+                org.apache.jackrabbit.core.ShareableNodeTest#testSharedNodePath
               </value>
             </property>
           </systemProperties>

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ShareableNodeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ShareableNodeTest.java?rev=699265&r1=699264&r2=699265&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ShareableNodeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ShareableNodeTest.java
Fri Sep 26 03:58:55 2008
@@ -24,6 +24,7 @@
 import java.util.ArrayList;
 
 import javax.jcr.ImportUUIDBehavior;
+import javax.jcr.Item;
 import javax.jcr.Node;
 import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;
@@ -1474,6 +1475,30 @@
         testRootNode.save();
     }
 
+    /**
+     * Verify that shared nodes return correct paths.
+     */
+    public void testSharedNodePath() throws Exception {
+       Node a1 = testRootNode.addNode("a1");
+       Node a2 = a1.addNode("a2");
+       Node b1 = a1.addNode("b1");
+       b1.addMixin("mix:shareable");
+       testRootNode.save();
+
+       //now we have a shareable node N with path a1/b1
+
+       Session session = testRootNode.getSession();
+       Workspace workspace = session.getWorkspace();
+       String path = a2.getPath() + "/b2";
+       workspace.clone(workspace.getName(), b1.getPath(), path, false);
+
+       //now we have another shareable node N' in the same shared set as N with path a1/a2/b2
+
+       //using the path a1/a2/b2, we should get the node N' here
+       Item item = session.getItem(path);
+       assertEquals("unexpectedly got the path from another node from the same shared set",
path, item.getPath()); 
+    } 
+    
     //---------------------------------------------------------- utility methods
 
     /**



Mime
View raw message