public class NodeReorderTest extends AbstractObservationTest
Node.orderBefore(String, String) operations trigger
the appropriate observation events.
testroot must allow orderable child nodes of type
nodetype, otherwise the test cases throw a
NotExecutableException. Some tests are only executed if the node
at testroot support same name sibling child nodes.
nodetype node type that allows child nodes of the same type.
nodename1 child node name of type nodetype
nodename2 child node name of type nodetype
nodename3 child node name of type nodetype
AbstractObservationTest.CallableALL_TYPES, DEFAULT_WAIT_TIMEOUT, obsMgrisReadOnly, 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, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, vf, workspaceName| Constructor and Description |
|---|
NodeReorderTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInfoEntry(Map<?,?> info,
String key,
String expected)
Checks if the info map contains the given
key with the
expected value. |
protected void |
checkNodeAdded(List<javax.jcr.observation.Event> events,
String[] requiredRelPaths,
String[] optionalRelPaths) |
protected void |
checkNodeRemoved(List<javax.jcr.observation.Event> events,
String[] requiredRelPaths,
String[] optionalRelPaths) |
protected void |
checkNodeReordered(javax.jcr.observation.Event[] events,
String src,
String dest,
String before)
Checks
Events for paths. |
protected void |
checkNodeReordered(List<javax.jcr.observation.Event> events,
String src,
String dest,
String before) |
void |
testNodeReorderAddRemove()
Tests if reordering a child node triggers a
Event.NODE_REMOVED
and a Event.NODE_ADDED event. |
void |
testNodeReorderMove()
Tests if reordering a child node triggers a
Event.NODE_MOVED
event. |
void |
testNodeReorderSameName()
Tests if reordering a child node triggers a
Event.NODE_REMOVED
and a Event.NODE_ADDED event with same name siblings. |
void |
testNodeReorderSameNameWithRemove()
Tests if reordering a child node triggers a
Event.NODE_REMOVED
and a Event.NODE_ADDED event with same name siblings. |
addEventListener, addEventListener, checkNodeAdded, checkNodeRemoved, checkNodes, checkPropertyAdded, checkPropertyChanged, checkPropertyRemoved, getEventByPath, getEvents, removeEventListener, setUp, tearDown, toArraycheckSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, runassertEquals, 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, toStringpublic void testNodeReorderAddRemove()
throws javax.jcr.RepositoryException,
NotExecutableException
Event.NODE_REMOVED
and a Event.NODE_ADDED event.javax.jcr.RepositoryExceptionNotExecutableExceptionpublic void testNodeReorderMove()
throws javax.jcr.RepositoryException,
NotExecutableException
Event.NODE_MOVED
event.javax.jcr.RepositoryExceptionNotExecutableExceptionpublic void testNodeReorderSameName()
throws javax.jcr.RepositoryException,
NotExecutableException
Event.NODE_REMOVED
and a Event.NODE_ADDED event with same name siblings.javax.jcr.RepositoryExceptionNotExecutableExceptionpublic void testNodeReorderSameNameWithRemove()
throws javax.jcr.RepositoryException,
NotExecutableException
Event.NODE_REMOVED
and a Event.NODE_ADDED event with same name siblings. Furthermore
a node is removed in the same save scope.javax.jcr.RepositoryExceptionNotExecutableExceptionprotected void checkNodeReordered(javax.jcr.observation.Event[] events,
String src,
String dest,
String before)
throws javax.jcr.RepositoryException
events - the Events.src - the source child path where the node was reordered from.dest - the destination child path where the node was reordered to.before - the destination child path where the node was reordered before.javax.jcr.RepositoryException - if an error occurs while retrieving the nodes
from event instances.protected void checkNodeReordered(List<javax.jcr.observation.Event> events, String src, String dest, String before) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected void checkInfoEntry(Map<?,?> info, String key, String expected)
key with the
expected value.info - the event info map.key - the name of the key.expected - the expected value.protected void checkNodeAdded(List<javax.jcr.observation.Event> events, String[] requiredRelPaths, String[] optionalRelPaths) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.