Package org.apache.jackrabbit.test.api
Class NodeOrderableChildNodesTest
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.jackrabbit.test.JUnitTest
-
- org.apache.jackrabbit.test.AbstractJCRTest
-
- org.apache.jackrabbit.test.api.NodeOrderableChildNodesTest
-
- All Implemented Interfaces:
junit.framework.Test
public class NodeOrderableChildNodesTest extends AbstractJCRTest
NodeOrderableChildNodesTest
contains all node writing tests (LEVEL 2) that require a node that allows child node ordering (tests therefore are optional).If the repository does not support a node type with orderable child nodes a
NotExecutableException
exception is thrown.Prerequisites:
javax.jcr.tck.NodeOrderableChildNodesTest.nodetype2
Name of a valid node type that allows orderable child nodesjavax.jcr.tck.NodeOrderableChildNodesTest.nodetype3
Name of a valid node type that can be added as child node
-
-
Field Summary
-
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 NodeOrderableChildNodesTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
tearDown()
void
testOrderBeforeInvalidDest()
Tries to reorder child nodes usingNode.orderBefore(String, String)
with an invalid destination reference.void
testOrderBeforeInvalidSrc()
Tries to reorder child nodes usingNode.orderBefore(String, String)
with an invalid source reference.void
testOrderBeforePlaceAtEndParentSave()
Creates two child nodes, reorders first node to end, uses parentNode'sItem.save()
.void
testOrderBeforePlaceAtEndSessionSave()
Test Creates two child nodes, verifies that they are added propery.void
testOrderBeforeSecondToFirstParentSave()
Creates two child nodes, reorders second node before first, uses parentNode'sItem.save()
.void
testOrderBeforeSecondToFirstSessionSave()
Creates two child nodes than reorders second node before first, saves usingSession.save()
.void
testOrderBeforeUnsupportedRepositoryOperationException()
Tries to reorder on a node usingNode.orderBefore(String, String)
that does not support child reordering.-
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, setUp
-
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
-
tearDown
protected void tearDown() throws Exception
- Overrides:
tearDown
in classAbstractJCRTest
- Throws:
Exception
-
testOrderBeforeInvalidDest
public void testOrderBeforeInvalidDest() throws RepositoryException, NotExecutableException
Tries to reorder child nodes usingNode.orderBefore(String, String)
with an invalid destination reference.This should throw an
ItemNotFoundException
.
-
testOrderBeforeInvalidSrc
public void testOrderBeforeInvalidSrc() throws RepositoryException, NotExecutableException
Tries to reorder child nodes usingNode.orderBefore(String, String)
with an invalid source reference.This should throw an
ItemNotFoundException
.
-
testOrderBeforeUnsupportedRepositoryOperationException
public void testOrderBeforeUnsupportedRepositoryOperationException() throws RepositoryException, NotExecutableException
Tries to reorder on a node usingNode.orderBefore(String, String)
that does not support child reordering.This should throw and
UnsupportedRepositoryOperationException
. Prequisites:- javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype2: A valid node type that does not support child node ordering.
- javax.jcr.tck.NodeOrderableChildNodesTest.testOrderBeforeUnsupportedRepositoryOperationException.nodetype3: A valid node type that can be added as a child.
-
testOrderBeforePlaceAtEndParentSave
public void testOrderBeforePlaceAtEndParentSave() throws RepositoryException, NotExecutableException
Creates two child nodes, reorders first node to end, uses parentNode'sItem.save()
.
-
testOrderBeforePlaceAtEndSessionSave
public void testOrderBeforePlaceAtEndSessionSave() throws RepositoryException, NotExecutableException
Test Creates two child nodes, verifies that they are added propery. reorders first node to the end , checks again. uses session.save();
-
testOrderBeforeSecondToFirstParentSave
public void testOrderBeforeSecondToFirstParentSave() throws RepositoryException, NotExecutableException
Creates two child nodes, reorders second node before first, uses parentNode'sItem.save()
.
-
testOrderBeforeSecondToFirstSessionSave
public void testOrderBeforeSecondToFirstSessionSave() throws RepositoryException, NotExecutableException
Creates two child nodes than reorders second node before first, saves usingSession.save()
.
-
-