jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r516375 - /jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java
Date Fri, 09 Mar 2007 11:27:57 GMT
Author: angela
Date: Fri Mar  9 03:27:53 2007
New Revision: 516375

URL: http://svn.apache.org/viewvc?view=rev&rev=516375
Log:
fixing test

Modified:
    jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java

Modified: jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java?view=diff&rev=516375&r1=516374&r2=516375
==============================================================================
--- jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java
(original)
+++ jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/UpdateTest.java
Fri Mar  9 03:27:53 2007
@@ -152,7 +152,7 @@
 
     public void testUpdateRemovesExtraProperty() throws RepositoryException, NotExecutableException
{
         // create test node in default workspace
-        testRootNode.setProperty(propertyName1, "test");
+        testRootNode.setProperty(propertyName2, "test");
         testRootNode.save();
 
         String srcWorkspace = getAnotherWorkspace();
@@ -160,12 +160,15 @@
         Session session2 = helper.getSuperuserSession(srcWorkspace);
         // make sure the source-session has the corresponding node.
         Node testRootW2 = (Node) session2.getItem(testRootNode.getCorrespondingNodePath(srcWorkspace));
+        if (testRootW2.hasProperty(propertyName2)) {
+            throw new NotExecutableException();
+        }
 
         // call the update method on test node in default workspace
         testRootNode.update(srcWorkspace);
 
         // ok first check if node has no longer propertis
-        assertFalse("Node updated with Node.update() should have property removed", testRootNode.hasProperty(propertyName1));
+        assertFalse("Node updated with Node.update() should have property removed", testRootNode.hasProperty(propertyName2));
     }
 
     public void testUpdateAddsMissingSubtree() throws RepositoryException, NotExecutableException
{



Mime
View raw message