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.Callable
ALL_TYPES, DEFAULT_WAIT_TIMEOUT, obsMgr
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 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<Event> events,
String[] requiredRelPaths,
String[] optionalRelPaths) |
protected void |
checkNodeRemoved(List<Event> events,
String[] requiredRelPaths,
String[] optionalRelPaths) |
protected void |
checkNodeReordered(Event[] events,
String src,
String dest,
String before)
Checks
Events for paths. |
protected void |
checkNodeReordered(List<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, toArray
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
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
public void testNodeReorderAddRemove() throws RepositoryException, NotExecutableException
Event.NODE_REMOVED
and a Event.NODE_ADDED
event.public void testNodeReorderMove() throws RepositoryException, NotExecutableException
Event.NODE_MOVED
event.public void testNodeReorderSameName() throws RepositoryException, NotExecutableException
Event.NODE_REMOVED
and a Event.NODE_ADDED
event with same name siblings.public void testNodeReorderSameNameWithRemove() throws 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.protected void checkNodeReordered(Event[] events, String src, String dest, String before) throws RepositoryException
events
- the Event
s.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.RepositoryException
- if an error occurs while retrieving the nodes
from event instances.protected void checkNodeReordered(List<Event> events, String src, String dest, String before) throws RepositoryException
RepositoryException
protected 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<Event> events, String[] requiredRelPaths, String[] optionalRelPaths) throws RepositoryException
RepositoryException
protected void checkNodeRemoved(List<Event> events, String[] requiredRelPaths, String[] optionalRelPaths) throws RepositoryException
RepositoryException
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.