|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.configuration.event.ConfigurationListenerTestImpl
public class ConfigurationListenerTestImpl
A test event listener class that can be used for testing whether configurations generated correct events.
Constructor Summary | |
---|---|
ConfigurationListenerTestImpl(Object source)
Creates a new instance of ConfigurationListenerTestImpl and sets
the expected event source. |
Method Summary | |
---|---|
void |
checkEvent(int type,
String propName,
Object propValue,
boolean before)
Checks an expected event. |
void |
checkEventCount(int minEvents)
Checks if at least minEvents events have been received. |
void |
configurationChanged(ConfigurationEvent event)
|
void |
done()
Checks if all events has been processed. |
ConfigurationEvent |
nextEvent(int expectedType)
Returns the next received event and checks for the expected type. |
void |
skipToLast(int type)
Skips to the last received event and checks that no events of the given type have been received. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationListenerTestImpl(Object source)
ConfigurationListenerTestImpl
and sets
the expected event source.
source
- the event source (null if the source need not to be
checked)Method Detail |
---|
public void configurationChanged(ConfigurationEvent event)
configurationChanged
in interface ConfigurationListener
public void checkEventCount(int minEvents)
minEvents
events have been received.
minEvents
- the minimum number of expected eventspublic void checkEvent(int type, String propName, Object propValue, boolean before)
type
- the event typepropName
- the expected property namepropValue
- the expected property valuebefore
- the expected before flagpublic ConfigurationEvent nextEvent(int expectedType)
checkEvent()
for comparing
complex event values.
expectedType
- the expected type of the event
public void skipToLast(int type)
type
- the event typepublic void done()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |