jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r314901 - /incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java
Date Wed, 12 Oct 2005 13:45:12 GMT
Author: stefan
Date: Wed Oct 12 06:45:08 2005
New Revision: 314901

URL: http://svn.apache.org/viewcvs?rev=314901&view=rev
Log:
removing incorrect & redundant test case 

Modified:
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java?rev=314901&r1=314900&r2=314901&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java
Wed Oct 12 06:45:08 2005
@@ -101,57 +101,6 @@
     }
 
     /**
-     * Test if Node.checkout() has no effect if the versionable node has been
-     * checked out before.
-     * <p/>
-     * As 'has no effect' means that the whole repository is in the exact same
-     * state as before and this isn't testable easily we test here only if the
-     * properties of the current node don't change (tested by a copy of the
-     * original node and compare the not autocreated properties (autocreated
-     * properties only because autocreated properties like UUID, creationdate
-     * etc will not be equal as expected)).
-     */
-    public void testCheckOutAlreadyCheckedOutNode() throws RepositoryException {
-        versionableNode.checkout();
-
-        // build a copy of versionableNode.
-        String copiedNodePath = testRoot + "/" + nodeName2;
-        superuser.getWorkspace().copy(versionableNode.getPath(), copiedNodePath);
-        Node copiedNode = (Node) superuser.getItem(copiedNodePath);
-
-        // perform 2nd checkout
-        versionableNode.checkout();
-
-        // check if the values of all not autocreated properties of
-        // the original node are equal to the ones of the copied node.
-        PropertyIterator propIt = versionableNode.getProperties();
-        while (propIt.hasNext()) {
-            Property origProp = propIt.nextProperty();
-            Property copyProp = copiedNode.getProperty(origProp.getName());
-            if (!origProp.getDefinition().isAutoCreated()) {
-                if (origProp.getDefinition().isMultiple()) {
-                    Value[] origValues = origProp.getValues();
-                    Value[] copyValues = copyProp.getValues();
-                    int i = 0;
-                    while (i < origValues.length) {
-                        if (!origValues[i].equals(copyValues[i])) {
-                            fail("After calling Node.checkout() on an already checket-out
versionable node must not have changed property '" + origProp.getName() + "'.");
-                        }
-                        i++;
-                    }
-                } else {
-                    if (!origProp.getValue().equals(copyProp.getValue())) {
-                        fail("After calling Node.checkout() on an already checket-out versionable
node must not have changed property '" + origProp.getName() + "'.");
-                    }
-                }
-            }
-        }
-
-        // success if passed: neither of the properties (exluding autocreated ones) changed
-        // between first and second checkout.
-    }
-
-    /**
      * Test if Node.checkout() copies the node's jcr:baseVersion to node's
      * jcr:predecessors property (no save required).
      */



Mime
View raw message