public abstract class TestListener extends Object
| Constructor and Description |
|---|
TestListener() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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 nullpublic boolean shouldInvokeTestMethod(Object testObject, Method testMethod)
testObject - The test instance, not nulltestMethod - The test method, not nullCopyright © 2016. All Rights Reserved.