类 ResetMocksTestExecutionListener
java.lang.Object
cn.taketoday.test.context.support.AbstractTestExecutionListener
cn.taketoday.framework.test.mock.mockito.ResetMocksTestExecutionListener
- 所有已实现的接口:
cn.taketoday.core.Ordered,TestExecutionListener
TestExecutionListener to reset any mock beans that have been marked with a
MockReset. Typically used alongside MockitoTestExecutionListener.- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb
- 另请参阅:
-
字段概要
字段从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidafterTestMethod(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.private voidresetMocks(cn.taketoday.context.ApplicationContext applicationContext, MockReset reset) private voidresetMocks(cn.taketoday.context.ConfigurableApplicationContext applicationContext, MockReset reset) 从类继承的方法 cn.taketoday.test.context.support.AbstractTestExecutionListener
afterTestClass, afterTestExecution, beforeTestClass, beforeTestExecution, prepareTestInstance
-
字段详细资料
-
MOCKITO_IS_PRESENT
private static final boolean MOCKITO_IS_PRESENT
-
-
构造器详细资料
-
ResetMocksTestExecutionListener
public ResetMocksTestExecutionListener()
-
-
方法详细资料
-
getOrder
public int getOrder()从类复制的说明:AbstractTestExecutionListenerThe 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- 覆盖:
getOrder在类中AbstractTestExecutionListener
-
beforeTestMethod
从类复制的说明:AbstractTestExecutionListenerThe default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
beforeTestMethod在接口中TestExecutionListener- 覆盖:
beforeTestMethod在类中AbstractTestExecutionListener- 参数:
testContext- the test context in which the test method will be executed; nevernull- 抛出:
Exception- allows any exception to propagate- 另请参阅:
-
afterTestMethod
从类复制的说明:AbstractTestExecutionListenerThe default implementation is empty. Can be overridden by subclasses as necessary.- 指定者:
afterTestMethod在接口中TestExecutionListener- 覆盖:
afterTestMethod在类中AbstractTestExecutionListener- 参数:
testContext- the test context in which the test method was executed; nevernull- 抛出:
Exception- allows any exception to propagate- 另请参阅:
-
resetMocks
private void resetMocks(cn.taketoday.context.ApplicationContext applicationContext, MockReset reset) -
resetMocks
private void resetMocks(cn.taketoday.context.ConfigurableApplicationContext applicationContext, MockReset reset)
-