Package org.apache.jackrabbit.test.api
Class WorkspaceCopyBetweenWorkspacesSameNameSibsTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.WorkspaceCopyBetweenWorkspacesSameNameSibsTest
-
- All Implemented Interfaces:
junit.framework.Test
public class WorkspaceCopyBetweenWorkspacesSameNameSibsTest extends AbstractJCRTest
WorkspaceCopyBetweenWorkspacesSameNameSibsTestcontains tests for copying nodes as same name siblings between workspace.
-
-
Field Summary
Fields Modifier and Type Field Description protected Nodenode1A referenceable node in default workspaceprotected Nodenode1W2A referenceable node in default workspaceprotected Nodenode2A non-referenceable node in default workspaceprotected Nodenode2W2A non-referenceable node in default workspaceprotected StringPROP_SAME_NAME_SIBS_FALSE_NODE_TYPENode type with sameNameSibs=false NodeDefprotected StringPROP_SAME_NAME_SIBS_TRUE_NODE_TYPENode type with sameNameSibs=true NodeDefprotected SessionrwSessionW2A read-write session for the non default workspaceprotected NodeTypesameNameSibsFalseNodeTypeA node type where NO same-name siblings allowedprotected NodeTypesameNameSibsTrueNodeTypeA node type where same-name siblings are allowedprotected SessionsuperuserW2The superuser session for the non default workspace-
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 WorkspaceCopyBetweenWorkspacesSameNameSibsTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetOtherWorkspaceName()protected voidinitNodesW2()protected voidsetUp()protected voidtearDown()voidtestCopyNodesNodeExistsAtDestPath()An ItemExistsException is thrown if a node or property already exists at destAbsPath.voidtestCopyNodesOrderingSupportedByParent()If ordering is supported by the node type of the parent node of the new location, then the newly moved node is appended to the end of the child node list.-
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
-
-
-
-
Field Detail
-
PROP_SAME_NAME_SIBS_TRUE_NODE_TYPE
protected final String PROP_SAME_NAME_SIBS_TRUE_NODE_TYPE
Node type with sameNameSibs=true NodeDef- See Also:
- Constant Field Values
-
PROP_SAME_NAME_SIBS_FALSE_NODE_TYPE
protected final String PROP_SAME_NAME_SIBS_FALSE_NODE_TYPE
Node type with sameNameSibs=false NodeDef- See Also:
- Constant Field Values
-
sameNameSibsTrueNodeType
protected NodeType sameNameSibsTrueNodeType
A node type where same-name siblings are allowed
-
sameNameSibsFalseNodeType
protected NodeType sameNameSibsFalseNodeType
A node type where NO same-name siblings allowed
-
superuserW2
protected Session superuserW2
The superuser session for the non default workspace
-
rwSessionW2
protected Session rwSessionW2
A read-write session for the non default workspace
-
node1W2
protected Node node1W2
A referenceable node in default workspace
-
node2W2
protected Node node2W2
A non-referenceable node in default workspace
-
node1
protected Node node1
A referenceable node in default workspace
-
node2
protected Node node2
A non-referenceable node in default workspace
-
-
Method Detail
-
testCopyNodesOrderingSupportedByParent
public void testCopyNodesOrderingSupportedByParent() throws RepositoryExceptionIf ordering is supported by the node type of the parent node of the new location, then the newly moved node is appended to the end of the child node list.- Throws:
RepositoryException
-
testCopyNodesNodeExistsAtDestPath
public void testCopyNodesNodeExistsAtDestPath() throws RepositoryExceptionAn ItemExistsException is thrown if a node or property already exists at destAbsPath.sameNameSibsFalseNodeTypename of a node type that does not allows same name siblings.nodeName3name of a child node that does not allow same name siblings..
- Throws:
RepositoryException
-
getOtherWorkspaceName
protected String getOtherWorkspaceName() throws NotExecutableException
- Throws:
NotExecutableException
-
initNodesW2
protected void initNodesW2() throws RepositoryException- Throws:
RepositoryException
-
-