jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r428057 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/NodeOrderableChildNodesTest.java
Date Wed, 02 Aug 2006 17:05:35 GMT
Author: mreutegg
Date: Wed Aug  2 10:05:34 2006
New Revision: 428057

URL: http://svn.apache.org/viewvc?rev=428057&view=rev
Log:
JCR-514: TCK: NodeOrderableChildNodesTest tests node order even if node type doesn't support
child node ordering

Modified:
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/NodeOrderableChildNodesTest.java

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/NodeOrderableChildNodesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/NodeOrderableChildNodesTest.java?rev=428057&r1=428056&r2=428057&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/NodeOrderableChildNodesTest.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/NodeOrderableChildNodesTest.java
Wed Aug  2 10:05:34 2006
@@ -109,17 +109,25 @@
      * that does not support child reordering. <br/><br/> This should throw and
      * {@link UnsupportedRepositoryOperationException}. Prequisites: <ul>
      * <li>javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype2</li>
-     * A valid node type that does not suport child node ordering.</li>
+     * A valid node type that does not support child node ordering.</li>
      * <li>javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype3</li>
      * A valid node type that can be added as a child. </ul>
      */
     public void testOrderBeforeUnsupportedRepositoryOperationException()
             throws RepositoryException, NotExecutableException {
-        prepareTest();
+
+        // create testNode
+        parentNode = testRootNode.addNode(nodeName1, getProperty("nodetype2"));
+        // add child node
+        Node firstNode = parentNode.addNode(nodeName2, getProperty("nodetype3"));
+        // add a second child node
+        Node secondNode = parentNode.addNode(nodeName3, getProperty("nodetype3"));
+        // save the new nodes
+        superuser.save();
 
         // ok lets try to reorder
         try {
-            parentNode.orderBefore(initialSecondNode.getName(), initialFirstNode.getName());
+            parentNode.orderBefore(secondNode.getName(), firstNode.getName());
             fail("Trying to reorder child nodes using Node.orderBefore() on node that " +
                     "does not support ordering should throw UnsupportedRepositoryException!");
         } catch (UnsupportedRepositoryOperationException e) {



Mime
View raw message