Package org.apache.jackrabbit.test.api
Class WorkspaceCopySameNameSibsTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.WorkspaceCopySameNameSibsTest
-
- All Implemented Interfaces:
junit.framework.Test
public class WorkspaceCopySameNameSibsTest extends AbstractJCRTest
WorkspaceCopySameNameSibsTest
contains tests for copying nodes as same name siblings in one workspace.
-
-
Field Summary
Fields Modifier and Type Field Description protected Node
node1
A referenceable node in default workspaceprotected Node
node1W2
A referenceable node in default workspaceprotected Node
node2
A non-referenceable node in default workspaceprotected Node
node2W2
A non-referenceable node in default workspaceprotected String
PROP_SAME_NAME_SIBS_FALSE_NODE_TYPE
Node type with sameNameSibs=false NodeDefprotected String
PROP_SAME_NAME_SIBS_TRUE_NODE_TYPE
Node type with sameNameSibs=true NodeDefprotected Session
rwSessionW2
A read-write session for the non default workspaceprotected NodeType
sameNameSibsFalseNodeType
A node type where NO same-name siblings allowedprotected NodeType
sameNameSibsTrueNodeType
A node type where same-name siblings are allowedprotected Session
superuserW2
The 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 WorkspaceCopySameNameSibsTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getOtherWorkspaceName()
protected void
initNodesW2()
protected void
setUp()
protected void
tearDown()
void
testCopyNodesNodeExistsAtDestPath()
An ItemExistsException is thrown if a node or property already exists at destAbsPath.void
testCopyNodesNodeExistsAtDestPath2()
NO ItemExistsException is thrown if a node already exists at destAbsPath and the node allows same-name-siblings.void
testCopyNodesOrderingSupportedByParent()
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
-
getOtherWorkspaceName
protected String getOtherWorkspaceName() throws NotExecutableException
- Throws:
NotExecutableException
-
initNodesW2
protected void initNodesW2() throws RepositoryException
- Throws:
RepositoryException
-
testCopyNodesOrderingSupportedByParent
public void testCopyNodesOrderingSupportedByParent() throws RepositoryException
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.- Throws:
RepositoryException
-
testCopyNodesNodeExistsAtDestPath
public void testCopyNodesNodeExistsAtDestPath() throws RepositoryException
An ItemExistsException is thrown if a node or property already exists at destAbsPath.sameNameSibsFalseNodeType
name of a node type that does not allows same name siblings.nodeName3
name of a child node that does not allow same name siblings..
- Throws:
RepositoryException
-
testCopyNodesNodeExistsAtDestPath2
public void testCopyNodesNodeExistsAtDestPath2() throws RepositoryException
NO ItemExistsException is thrown if a node already exists at destAbsPath and the node allows same-name-siblings.sameNameSibsTrueNodeType
name of a node type that allows same name siblings.nodeName3
name of a child node that allows children with same name.
- Throws:
RepositoryException
-
-