jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r575001 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RemoveVersionTest.java
Date Wed, 12 Sep 2007 16:01:33 GMT
Author: reschke
Date: Wed Sep 12 09:01:28 2007
New Revision: 575001

URL: http://svn.apache.org/viewvc?rev=575001&view=rev
Log:
JCR-1120: use a different node name ("nodename2" already used by setup code), also check that
the node supports reference properties and abort with NotExecutableException otherwise


Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RemoveVersionTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RemoveVersionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RemoveVersionTest.java?rev=575001&r1=575000&r2=575001&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RemoveVersionTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RemoveVersionTest.java
Wed Sep 12 09:01:28 2007
@@ -22,6 +22,7 @@
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.Node;
 import javax.jcr.ReferentialIntegrityException;
+import javax.jcr.Value;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.VersionHistory;
@@ -187,14 +188,16 @@
      * version is still referenced by another node.
      * @tck.config nodetype name of a node type that supports a reference
      *  property.
-     * @tck.config nodename2 name of the node created with <code>nodetype</code>.
+     * @tck.config nodename4 name of the node created with <code>nodetype</code>.
      * @tck.config propertyname1 a single value reference property available
      *  in <code>nodetype</code>.
      */
-    public void testReferentialIntegrityException() throws RepositoryException {
+    public void testReferentialIntegrityException() throws RepositoryException, NotExecutableException
{
         // create reference: n1.p1 -> version
-        Node n1 = testRootNode.addNode(nodeName2, testNodeType);
-        n1.setProperty(propertyName1, superuser.getValueFactory().createValue(version));
+        Node n1 = testRootNode.addNode(nodeName4, testNodeType);
+        Value refValue = superuser.getValueFactory().createValue(version);
+        ensureCanSetProperty(n1, propertyName1, refValue);
+        n1.setProperty(propertyName1, refValue);
         testRootNode.save();
 
         try {



Mime
View raw message