|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.groboutils.autodoc.v1.junit.AutoDocJUnitListener
Listens to JUnit tests, and chains the calls to other listeners. This allows for a central repository to register a listener. This class allows for using the SPI extention mechanism to define delegated-to listeners if no listeners are passed to the constructor.
Constructor Summary | |
AutoDocJUnitListener()
Create a new listener, using the singleton store to specify all test listener factories. |
|
AutoDocJUnitListener(TestListenerFactory[] factories)
Create a new listener using the given factories to specify all JUnit listeners. |
Method Summary | |
void |
addError(junit.framework.Test test,
java.lang.Throwable t)
An error occurred. |
void |
addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t)
A failure occurred. |
void |
addListener(junit.framework.TestListener tl)
Add an individual JUnit TestListener to the inner set of listeners. |
void |
endTest(junit.framework.Test test)
A test ended. |
protected static TestListenerFactory[] |
getFactories()
Return all the currently known test listener factories, using the singleton returned by getFactoryStore() |
static SPISingletonStore |
getFactoryStore()
Retrieve the AutoDocJUnitListenerFactory singleton store for setting up the factory to be used for all unspecified constructor invocations to AutoDocJUnitListener instances. |
java.util.Enumeration |
getListeners()
Return a list of all known inner listeners. |
protected void |
loadListeners(TestListenerFactory factory)
Creates the listener from the factory, and adds it to the inner list. |
void |
startTest(junit.framework.Test test)
A test started. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AutoDocJUnitListener()
public AutoDocJUnitListener(TestListenerFactory[] factories)
Method Detail |
public void addListener(junit.framework.TestListener tl)
tl
- the listener to register. If tl is null,
then the request is ignored.public java.util.Enumeration getListeners()
public void addError(junit.framework.Test test, java.lang.Throwable t)
addError
in interface junit.framework.TestListener
public void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t)
addFailure
in interface junit.framework.TestListener
public void endTest(junit.framework.Test test)
endTest
in interface junit.framework.TestListener
public void startTest(junit.framework.Test test)
startTest
in interface junit.framework.TestListener
protected void loadListeners(TestListenerFactory factory)
factory
- the factory to create the listener from.addListener( TestListener )
public static SPISingletonStore getFactoryStore()
protected static TestListenerFactory[] getFactories()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |