|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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. |
boolean |
shouldInvokeTestMethod(Object testObject,
Method testMethod)
Method to test whether this method should be executed or not. |
| 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 null
public void beforeTestSetUp(Object testObject,
Method testMethod)
testObject - The test instance, not nulltestMethod - The test method, not null
public void beforeTestMethod(Object testObject,
Method testMethod)
testObject - The test instance, not nulltestMethod - The test method, not null
public 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 thrown
public void afterTestTearDown(Object testObject,
Method testMethod)
testObject - The test instance, not nulltestMethod - The test method, not null
public boolean shouldInvokeTestMethod(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 | |||||||||