Class MergeSubNodeTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.version.AbstractMergeTest
-
- org.apache.jackrabbit.test.api.version.MergeSubNodeTest
-
- All Implemented Interfaces:
junit.framework.Test
public class MergeSubNodeTest extends AbstractMergeTest
MergeSubNodeTestcontains 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
isReadOnly, jcrBaseVersion, jcrCopiedFrom, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrIsCheckedOut, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixShareable, mixSimpleVersionable, mixTitle, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntActivity, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, vf, workspaceName
-
-
Constructor Summary
Constructors Constructor Description MergeSubNodeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable_testMergeNodeBestEffortTrue()Node.merge(): bestEffort is true > (sub)node which could not be merged are not affected.voiddisable_testMergeNodeBestEffortTrueJcr2()VersionManager.merge(): bestEffort is true > (sub)node which could not be merged are not affected.voiddisable_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 invoiddisable_testMergeNodeFromUpdatedSourceWorkspaceJcr2()VersionManager.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 invoiddisable_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'.voiddisable_testMergeNodeSubNodesMergeTestJcr2()VersionManager.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'.voiddisable_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 testvoiddisable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdateJcr2()VersionManager.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 testprotected voidinitNodes()initialize a two-step-hierarchy on default and second workspaceprotected voidsetUp()Initialising used variables coming from the properties file.
Setup some nodes on the 2 workspaces.protected voidtearDown()Tidy the testRootNodes of both workspaces, then logout sessionsvoidtestMergeNodeFromOlderSourceWorkspace()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 invoidtestMergeNodeFromOlderSourceWorkspaceJcr2()VersionManager.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.AbstractJCRTest
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
-
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runBare, runTest, setName, toString
-
-
-
-
Method Detail
-
setUp
protected void setUp() throws ExceptionDescription copied from class:AbstractMergeTestInitialising used variables coming from the properties file.
Setup some nodes on the 2 workspaces.- Overrides:
setUpin classAbstractMergeTest- Throws:
Exception
-
tearDown
protected void tearDown() throws ExceptionDescription copied from class:AbstractMergeTestTidy the testRootNodes of both workspaces, then logout sessions- Overrides:
tearDownin classAbstractMergeTest- Throws:
Exception
-
disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdate
public void disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdate() throws RepositoryExceptionNode.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:
RepositoryException
-
disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdateJcr2
public void disable_testRemoveNodeFromSourceWorkspaceAndMergeWithUpdateJcr2() throws RepositoryExceptionVersionManager.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:
RepositoryException
-
disable_testMergeNodeFromUpdatedSourceWorkspace
public void disable_testMergeNodeFromUpdatedSourceWorkspace() throws RepositoryExceptionNode.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:
RepositoryException
-
disable_testMergeNodeFromUpdatedSourceWorkspaceJcr2
public void disable_testMergeNodeFromUpdatedSourceWorkspaceJcr2() throws RepositoryExceptionVersionManager.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:
RepositoryException
-
testMergeNodeFromOlderSourceWorkspace
public void testMergeNodeFromOlderSourceWorkspace() throws RepositoryExceptionNode.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:
RepositoryException
-
testMergeNodeFromOlderSourceWorkspaceJcr2
public void testMergeNodeFromOlderSourceWorkspaceJcr2() throws RepositoryExceptionVersionManager.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:
RepositoryException
-
disable_testMergeNodeBestEffortTrue
public void disable_testMergeNodeBestEffortTrue() throws RepositoryExceptionNode.merge(): bestEffort is true > (sub)node which could not be merged are not affected.- Throws:
RepositoryException
-
disable_testMergeNodeBestEffortTrueJcr2
public void disable_testMergeNodeBestEffortTrueJcr2() throws RepositoryExceptionVersionManager.merge(): bestEffort is true > (sub)node which could not be merged are not affected.- Throws:
RepositoryException
-
disable_testMergeNodeSubNodesMergeTest
public void disable_testMergeNodeSubNodesMergeTest() throws RepositoryExceptionNode.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:
RepositoryException
-
disable_testMergeNodeSubNodesMergeTestJcr2
public void disable_testMergeNodeSubNodesMergeTestJcr2() throws RepositoryExceptionVersionManager.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:
RepositoryException
-
initNodes
protected void initNodes() throws RepositoryExceptioninitialize a two-step-hierarchy on default and second workspace- Throws:
RepositoryException
-
-