org.apache.jackrabbit.test.api.version
Class MergeSubNodeTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.jackrabbit.test.JUnitTest
              extended byorg.apache.jackrabbit.test.AbstractJCRTest
                  extended byorg.apache.jackrabbit.test.api.version.AbstractMergeTest
                      extended byorg.apache.jackrabbit.test.api.version.MergeSubNodeTest
All Implemented Interfaces:
junit.framework.Test

public class MergeSubNodeTest
extends AbstractMergeTest

MergeSubNodeTest contains tests dealing with sub nodes in the subtree of the node on which merge is called.


Field Summary
 
Fields inherited from class org.apache.jackrabbit.test.api.version.AbstractMergeTest
CHANGED_STRING, nonVersionableNodeType, superuserW2, testRootNodeW2, versionableNodeType, workspace, workspaceW2
 
Fields inherited from class org.apache.jackrabbit.test.AbstractJCRTest
helper, isReadOnly, jcrBaseVersion, jcrCreated, jcrFrozenNode, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testPath, testRoot, testRootNode, workspaceName
 
Fields inherited from class org.apache.jackrabbit.test.JUnitTest
log
 
Constructor Summary
MergeSubNodeTest()
           
 
Method Summary
 void disable_testMergeNodeBestEffortTrue()
          Node.merge(): bestEffort is true > (sub)node which could not be merged are not affected.
 void disable_testMergeNodeFromUpdatedSourceWorkspace()
          Node.merge(): versionable subNode N checked-in: If V' is a successor (to any degree) of V, then the merge result for N is update
modify a node on the workspace1 and then merge the one in workspace2 with the one in workspace1 precondition is that the node in workspace2 is checked in
 void disable_testMergeNodeSubNodesMergeTest()
          Node.merge(): For each versionable node N in the subtree rooted at this node,
a merge test is performed comparing N with its corresponding node in workspace, N'.
 void disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdate()
          Node.merge(): versionable subNode N: If N has status leave but parent is update, then the subnode N is removed
retrieve the initialised node to perform operations we need before for this test
protected  void initNodes()
          initialize a two-step-hierarchy on default and second workspace
protected  void setUp()
          Initialising used variables coming from the properties file.
Setup some nodes on the 2 workspaces.
 void testMergeNodeFromOlderSourceWorkspace()
          Node.merge(): versionable subNode N checked-in: If V' is a predecessor (to any degree) of V or if V and V' are identical (i.e., are actually the same version), then the merge result for N is leave
modify a node on the workspace2 and then merge the one in workspace2 with the one in workspace1
the node in workspace2 should be updated
precondition is that the node in workspace2 is checked in
 
Methods inherited from class org.apache.jackrabbit.test.api.version.AbstractMergeTest
tearDown
 
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
createRandomString, getNonExistingWorkspaceName, getProperty, getSize, run
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MergeSubNodeTest

public MergeSubNodeTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: AbstractMergeTest
Initialising used variables coming from the properties file.
Setup some nodes on the 2 workspaces.

Overrides:
setUp in class AbstractMergeTest
Throws:
java.lang.Exception

disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdate

public void disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdate()
                                                                 throws javax.jcr.RepositoryException
Node.merge(): versionable subNode N: If N has status leave but parent is update, then the subnode N is removed
retrieve the initialised node to perform operations we need before for this test

Throws:
javax.jcr.RepositoryException

disable_testMergeNodeFromUpdatedSourceWorkspace

public void disable_testMergeNodeFromUpdatedSourceWorkspace()
                                                     throws javax.jcr.RepositoryException
Node.merge(): versionable subNode N checked-in: If V' is a successor (to any degree) of V, then the merge result for N is update
modify a node on the workspace1 and then merge the one in workspace2 with the one in workspace1 precondition is that the node in workspace2 is checked in

Throws:
javax.jcr.RepositoryException

testMergeNodeFromOlderSourceWorkspace

public void testMergeNodeFromOlderSourceWorkspace()
                                           throws javax.jcr.RepositoryException
Node.merge(): versionable subNode N checked-in: If V' is a predecessor (to any degree) of V or if V and V' are identical (i.e., are actually the same version), then the merge result for N is leave
modify a node on the workspace2 and then merge the one in workspace2 with the one in workspace1
the node in workspace2 should be updated
precondition is that the node in workspace2 is checked in

Throws:
javax.jcr.RepositoryException

disable_testMergeNodeBestEffortTrue

public void disable_testMergeNodeBestEffortTrue()
                                         throws javax.jcr.RepositoryException
Node.merge(): bestEffort is true > (sub)node which could not be merged are not affected.

Throws:
javax.jcr.RepositoryException

disable_testMergeNodeSubNodesMergeTest

public void disable_testMergeNodeSubNodesMergeTest()
                                            throws javax.jcr.RepositoryException
Node.merge(): For each versionable node N in the subtree rooted at this node,
a merge test is performed comparing N with its corresponding node in workspace, N'.

Throws:
javax.jcr.RepositoryException

initNodes

protected void initNodes()
                  throws javax.jcr.RepositoryException
initialize a two-step-hierarchy on default and second workspace

Throws:
javax.jcr.RepositoryException


Copyright © -2005 . All Rights Reserved.