public abstract class AbstractTestExecutionListener extends java.lang.Object implements TestExecutionListener, Ordered
TestExecutionListener interface which
provides empty method stubs. Subclasses can extend this class and override
only those methods suitable for the task at hand.HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractTestExecutionListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterTestClass(TestContext testContext)
The default implementation is empty.
|
void |
afterTestMethod(TestContext testContext)
The default implementation is empty.
|
void |
beforeTestClass(TestContext testContext)
The default implementation is empty.
|
void |
beforeTestMethod(TestContext testContext)
The default implementation is empty.
|
int |
getOrder()
The default implementation returns
Ordered.LOWEST_PRECEDENCE,
thereby ensuring that custom listeners are ordered after default
listeners supplied by the framework. |
void |
prepareTestInstance(TestContext testContext)
The default implementation is empty.
|
public void beforeTestClass(TestContext testContext) throws java.lang.Exception
beforeTestClass in interface TestExecutionListenertestContext - the test context for the test; never nulljava.lang.Exception - allows any exception to propagatepublic void prepareTestInstance(TestContext testContext) throws java.lang.Exception
prepareTestInstance in interface TestExecutionListenertestContext - the test context for the test; never nulljava.lang.Exception - allows any exception to propagatepublic void beforeTestMethod(TestContext testContext) throws java.lang.Exception
beforeTestMethod in interface TestExecutionListenertestContext - the test context in which the test method will be
executed; never nulljava.lang.Exception - allows any exception to propagatepublic void afterTestMethod(TestContext testContext) throws java.lang.Exception
afterTestMethod in interface TestExecutionListenertestContext - the test context in which the test method was
executed; never nulljava.lang.Exception - allows any exception to propagatepublic void afterTestClass(TestContext testContext) throws java.lang.Exception
afterTestClass in interface TestExecutionListenertestContext - the test context for the test; never nulljava.lang.Exception - allows any exception to propagatepublic int getOrder()
Ordered.LOWEST_PRECEDENCE,
thereby ensuring that custom listeners are ordered after default
listeners supplied by the framework. Can be overridden by subclasses
as necessary.getOrder in interface OrderedOrdered.HIGHEST_PRECEDENCE,
Ordered.LOWEST_PRECEDENCE