|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.jackrabbit.test.JUnitTest
org.apache.jackrabbit.test.AbstractJCRTest
org.apache.jackrabbit.test.api.observation.AbstractObservationTest
public abstract class AbstractObservationTest
This class implements the basic setUp() and tearDown()
methods for the observation test cases.
| Field Summary | |
|---|---|
protected static long |
DEFAULT_WAIT_TIMEOUT
Default wait timeout for events: 5000 ms |
protected ObservationManager |
obsMgr
The ObservationManager |
| Fields inherited from class org.apache.jackrabbit.test.AbstractJCRTest |
|---|
helper, isReadOnly, jcrBaseVersion, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrIsCheckedOut, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixShareable, mixSimpleVersionable, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testPath, testRoot, testRootNode, workspaceName |
| Fields inherited from class org.apache.jackrabbit.test.JUnitTest |
|---|
log |
| Constructor Summary | |
|---|---|
AbstractObservationTest()
|
|
| Method Summary | |
|---|---|
protected void |
addEventListener(EventListener listener)
Registers an EventListener for all events. |
protected void |
addEventListener(EventListener listener,
int eventType)
Registers an EventListener for events of the specified
type(s). |
protected void |
checkNodeAdded(Event[] events,
java.lang.String[] requiredRelPaths,
java.lang.String[] optionalRelPaths)
Checks Events for paths. |
protected void |
checkNodeRemoved(Event[] events,
java.lang.String[] requiredRelPaths,
java.lang.String[] optionalRelPaths)
Checks Events for paths. |
protected void |
checkNodes(Event[] events,
java.lang.String[] requiredRelPaths,
java.lang.String[] optionalRelPaths,
long eventType)
Checks Events for paths. |
protected void |
checkPropertyAdded(Event[] events,
java.lang.String[] relPaths)
Checks Events for paths. |
protected void |
checkPropertyChanged(Event[] events,
java.lang.String[] relPaths)
Checks Events for paths. |
protected void |
checkPropertyRemoved(Event[] events,
java.lang.String[] relPaths)
Checks Events for paths. |
protected void |
removeEventListener(EventListener listener)
Removes the EventListener from the ObservationManager. |
protected void |
setUp()
|
protected void |
tearDown()
|
protected EventListener[] |
toArray(EventListenerIterator it)
Consumes the EventListenerIterator and returns the
EventListener as an array. |
| Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest |
|---|
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureMultipleWorkspacesSupported, getJcrValue, getNonExistingWorkspaceName, getProperty, getProperty, getSize, isSupported, needsMixin, run |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
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, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final long DEFAULT_WAIT_TIMEOUT
protected ObservationManager obsMgr
ObservationManager
| Constructor Detail |
|---|
public AbstractObservationTest()
| Method Detail |
|---|
protected void setUp()
throws java.lang.Exception
setUp in class AbstractJCRTestjava.lang.Exception
protected void tearDown()
throws java.lang.Exception
tearDown in class AbstractJCRTestjava.lang.Exception
protected void addEventListener(EventListener listener)
throws RepositoryException
EventListener for all events.
listener - the EventListener.
RepositoryException - if registration fails.
protected void addEventListener(EventListener listener,
int eventType)
throws RepositoryException
EventListener for events of the specified
type(s).
listener - the EventListener.eventType - the event types
RepositoryException - if registration fails.
protected void removeEventListener(EventListener listener)
throws RepositoryException
EventListener from the ObservationManager.
listener - the EventListener to unregister.
RepositoryException - if unregister fails.protected EventListener[] toArray(EventListenerIterator it)
EventListenerIterator and returns the
EventListener as an array.
it - the iterator.
EventListeners.
protected void checkNodeAdded(Event[] events,
java.lang.String[] requiredRelPaths,
java.lang.String[] optionalRelPaths)
throws RepositoryException
Events for paths. All relPaths are
relative to AbstractJCRTest.testRoot.
events - the Events.requiredRelPaths - paths to child nodes added relative to AbstractJCRTest.testRoot (required events).optionalRelPaths - paths to child nodes added relative to AbstractJCRTest.testRoot (optional events).
RepositoryException - if an error occurs while retrieving the nodes
from event instances.
protected void checkNodeRemoved(Event[] events,
java.lang.String[] requiredRelPaths,
java.lang.String[] optionalRelPaths)
throws RepositoryException
Events for paths. All relPaths are
relative to AbstractJCRTest.testRoot.
events - the Events.requiredRelPaths - paths to child nodes added relative to AbstractJCRTest.testRoot (required events).optionalRelPaths - paths to child nodes added relative to AbstractJCRTest.testRoot (optional events).
RepositoryException - if an error occurs while retrieving the nodes
from event instances.
protected void checkPropertyAdded(Event[] events,
java.lang.String[] relPaths)
throws RepositoryException
Events for paths. All relPaths are
relative to AbstractJCRTest.testRoot.
events - the Events.relPaths - paths to added properties relative to AbstractJCRTest.testRoot.
RepositoryException - if an error occurs while retrieving the nodes
from event instances.
protected void checkPropertyChanged(Event[] events,
java.lang.String[] relPaths)
throws RepositoryException
Events for paths. All relPaths are
relative to AbstractJCRTest.testRoot.
events - the Events.relPaths - paths to changed properties relative to AbstractJCRTest.testRoot.
RepositoryException - if an error occurs while retrieving the nodes
from event instances.
protected void checkPropertyRemoved(Event[] events,
java.lang.String[] relPaths)
throws RepositoryException
Events for paths. All relPaths are
relative to AbstractJCRTest.testRoot.
events - the Events.relPaths - paths to removed properties relative to AbstractJCRTest.testRoot.
RepositoryException - if an error occurs while retrieving the nodes
from event instances.
protected void checkNodes(Event[] events,
java.lang.String[] requiredRelPaths,
java.lang.String[] optionalRelPaths,
long eventType)
throws RepositoryException
Events for paths. All relPaths are
relative to AbstractJCRTest.testRoot.
events - the Events.requiredRelPaths - paths to required item events relative to AbstractJCRTest.testRoot.optionalRelPaths - paths to optional item events relative to AbstractJCRTest.testRoot.eventType - the type of event to check.
RepositoryException - if an error occurs while retrieving the nodes
from event instances.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||