Package org.apache.jackrabbit.test.api
Class WorkspaceMoveSameNameSibsTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.WorkspaceMoveSameNameSibsTest
-
- All Implemented Interfaces:
junit.framework.Test
public class WorkspaceMoveSameNameSibsTest extends AbstractJCRTest
WorkspaceMoveSameNameSibsTest
contains tests for moving nodes with same name siblings supported 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 WorkspaceMoveSameNameSibsTest()
-
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
testMoveNodesNodeExistsAtDestPath()
An ItemExistsException is thrown if a node or property already exists at destAbsPath.void
testMoveNodesOrderingSupportedByParent()
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
-
testMoveNodesOrderingSupportedByParent
public void testMoveNodesOrderingSupportedByParent() 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
-
testMoveNodesNodeExistsAtDestPath
public void testMoveNodesNodeExistsAtDestPath() 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
-
-