类 AbstractTestExecutionListener
java.lang.Object
cn.taketoday.test.context.support.AbstractTestExecutionListener
- 所有已实现的接口:
cn.taketoday.core.Ordered,TestExecutionListener
- 直接已知子类:
AbstractDirtiesContextTestExecutionListener,ApplicationEventsTestExecutionListener,DependencyInjectionTestExecutionListener,EventPublishingTestExecutionListener,MockitoTestExecutionListener,ResetMocksTestExecutionListener,ServletTestExecutionListener,SqlScriptsTestExecutionListener,TransactionalTestExecutionListener
public abstract class AbstractTestExecutionListener
extends Object
implements TestExecutionListener, cn.taketoday.core.Ordered
Abstract ordered implementation of the
TestExecutionListener API.- 从以下版本开始:
- 4.0
- 作者:
- Sam Brannen, Juergen Hoeller
- 另请参阅:
-
字段概要
从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidafterTestClass(TestContext testContext) The default implementation is empty.voidafterTestExecution(TestContext testContext) The default implementation is empty.voidafterTestMethod(TestContext testContext) The default implementation is empty.voidbeforeTestClass(TestContext testContext) The default implementation is empty.voidbeforeTestExecution(TestContext testContext) The default implementation is empty.voidbeforeTestMethod(TestContext testContext) The default implementation is empty.intgetOrder()The default implementation returnsOrdered.LOWEST_PRECEDENCE, thereby ensuring that custom listeners are ordered after default listeners supplied by the framework.voidprepareTestInstance(TestContext testContext) The default implementation is empty.
-
构造器详细资料
-
AbstractTestExecutionListener
public AbstractTestExecutionListener()
-
-
方法详细资料
-
getOrder
public int getOrder()The default implementation returnsOrdered.LOWEST_PRECEDENCE, thereby ensuring that custom listeners are ordered after default listeners supplied by the framework. Can be overridden by subclasses as necessary.- 指定者:
getOrder在接口中cn.taketoday.core.Ordered
-
beforeTestClass
The default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
beforeTestClass在接口中TestExecutionListener- 参数:
testContext- the test context for the test; nevernull- 抛出:
Exception- allows any exception to propagate
-
prepareTestInstance
The default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
prepareTestInstance在接口中TestExecutionListener- 参数:
testContext- the test context for the test; nevernull- 抛出:
Exception- allows any exception to propagate
-
beforeTestMethod
The default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
beforeTestMethod在接口中TestExecutionListener- 参数:
testContext- the test context in which the test method will be executed; nevernull- 抛出:
Exception- allows any exception to propagate- 另请参阅:
-
beforeTestExecution
The default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
beforeTestExecution在接口中TestExecutionListener- 参数:
testContext- the test context in which the test method will be executed; nevernull- 抛出:
Exception- allows any exception to propagate- 另请参阅:
-
afterTestExecution
The default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
afterTestExecution在接口中TestExecutionListener- 参数:
testContext- the test context in which the test method will be executed; nevernull- 抛出:
Exception- allows any exception to propagate- 另请参阅:
-
afterTestMethod
The default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
afterTestMethod在接口中TestExecutionListener- 参数:
testContext- the test context in which the test method was executed; nevernull- 抛出:
Exception- allows any exception to propagate- 另请参阅:
-
afterTestClass
The default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
afterTestClass在接口中TestExecutionListener- 参数:
testContext- the test context for the test; nevernull- 抛出:
Exception- allows any exception to propagate
-