|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.unitils.core.TestListener
public abstract class TestListener
Listener for test events. The events must follow following ordering:
Constructor Summary | |
---|---|
TestListener()
|
Method Summary | |
---|---|
void |
afterCreateTestObject(Object testObject)
Invoked before any of the test in a test class are run. |
void |
afterTestMethod(Object testObject,
Method testMethod,
Throwable testThrowable)
Invoked after the test run but before the test tear down (e.g. |
void |
afterTestTearDown(Object testObject,
Method testMethod)
Invoked after the test tear down (eg @After). |
void |
beforeTestClass(Class<?> testClass)
Invoked before the generic class setup (e.g. |
void |
beforeTestMethod(Object testObject,
Method testMethod)
Invoked before the test but after the test setup (eg @Before) is run. |
void |
beforeTestSetUp(Object testObject,
Method testMethod)
Invoked before the test setup (eg @Before) is run. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TestListener()
Method Detail |
---|
public void beforeTestClass(Class<?> testClass)
testClass
- The class whose test methods are about to be executed, not nullpublic void afterCreateTestObject(Object testObject)
testObject
- The test class, not nullpublic void beforeTestSetUp(Object testObject, Method testMethod)
testObject
- The test instance, not nulltestMethod
- The test method, not nullpublic void beforeTestMethod(Object testObject, Method testMethod)
testObject
- The test instance, not nulltestMethod
- The test method, not nullpublic void afterTestMethod(Object testObject, Method testMethod, Throwable testThrowable)
testObject
- The test instance, not nulltestMethod
- The test method, not nulltestThrowable
- The throwable thrown during the test or beforeTestMethod, null if none was thrownpublic void afterTestTearDown(Object testObject, Method testMethod)
testObject
- The test instance, not nulltestMethod
- The test method, not null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |