You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2007/10/03 17:37:34 UTC
svn commit: r581632 -
/jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java
Author: angela
Date: Wed Oct 3 08:37:33 2007
New Revision: 581632
URL: http://svn.apache.org/viewvc?rev=581632&view=rev
Log:
Test: minor improvement
Modified:
jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java
Modified: jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java?rev=581632&r1=581631&r2=581632&view=diff
==============================================================================
--- jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java (original)
+++ jackrabbit/trunk/contrib/spi/client/src/test/java/org/apache/jackrabbit/jcr2spi/ReorderMoveTest.java Wed Oct 3 08:37:33 2007
@@ -39,7 +39,7 @@
testRootNode.save();
}
- private Node[] createOrderableChildren(boolean sns, boolean doSave) throws RepositoryException {
+ private Node[] createOrderableChildren(boolean sns) throws RepositoryException {
String[] childNames;
if (sns) {
childNames = new String[] {nodeName2, nodeName2, nodeName2, nodeName2};
@@ -52,9 +52,7 @@
children[2] = srcParent.addNode(childNames[2], testNodeType);
children[3] = srcParent.addNode(childNames[3], testNodeType);
- if (doSave) {
- testRootNode.save();
- }
+ testRootNode.save();
return children;
}
@@ -82,7 +80,7 @@
* Move a orderable child node and reorder the remaining nodes.
*/
public void testMoveAndReorder() throws RepositoryException {
- Node[] children = createOrderableChildren(false, true);
+ Node[] children = createOrderableChildren(false);
String oldName = children[2].getName();
// move
testRootNode.getSession().move(children[2].getPath(), destPath);
@@ -99,7 +97,7 @@
* Move a orderable SNS-node and reorder the remaining nodes at source-parent.
*/
public void testMoveAndReorderSNS() throws RepositoryException {
- Node[] children = createOrderableChildren(true, true);
+ Node[] children = createOrderableChildren(true);
String snsName = children[0].getName();
// move
@@ -126,7 +124,7 @@
* away. Test the ordering of the remaining siblings.
*/
public void testReorderAndMove() throws RepositoryException {
- Node[] children = createOrderableChildren(false, true);
+ Node[] children = createOrderableChildren(false);
// reorder first
srcParent.orderBefore(getRelPath(children[0]), null);
@@ -145,7 +143,7 @@
* away. Test the ordering of the remaining siblings.
*/
public void testReorderAndMoveSNS() throws RepositoryException {
- Node[] children = createOrderableChildren(true, true);
+ Node[] children = createOrderableChildren(true);
// reorder first
srcParent.orderBefore(getRelPath(children[0]), null);
@@ -163,7 +161,7 @@
* Any attempt reorder a moved node at its original position must fail.
*/
public void testReorderMovedNode() throws RepositoryException {
- Node[] children = createOrderableChildren(false, true);
+ Node[] children = createOrderableChildren(false);
String relPath = getRelPath(children[2]);
testRootNode.getSession().move(children[2].getPath(), destPath);
@@ -182,7 +180,7 @@
* hierarchy.
*/
public void testRevertMoveAndReorderSNS() throws RepositoryException {
- Node[] children = createOrderableChildren(true, true);
+ Node[] children = createOrderableChildren(true);
// move then reorder
testRootNode.getSession().move(children[2].getPath(), destPath);
srcParent.orderBefore(getRelPath(children[1]), null);
@@ -199,7 +197,7 @@
* hierarchy.
*/
public void testRevertReorderAndMoveSNS() throws RepositoryException {
- Node[] children = createOrderableChildren(true, true);
+ Node[] children = createOrderableChildren(true);
// reorder then move
srcParent.orderBefore(getRelPath(children[1]), null);
srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[2]));
@@ -216,7 +214,7 @@
* hierarchy.
*/
public void testRevertMoveReorderedSNS() throws RepositoryException {
- Node[] children = createOrderableChildren(true, true);
+ Node[] children = createOrderableChildren(true);
// reorder then move
srcParent.orderBefore(getRelPath(children[1]), null);
srcParent.orderBefore(getRelPath(children[3]), getRelPath(children[2]));