Class MockitoResetTestExecutionListener
java.lang.Object
org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.test.context.bean.override.mockito.MockitoResetTestExecutionListener
- All Implemented Interfaces:
Ordered
,TestExecutionListener
TestExecutionListener
that resets any mock beans that have been marked
with a MockReset
.- Since:
- 6.2
- Author:
- Phillip Webb
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
afterTestMethod
(TestContext testContext) The default implementation is empty.void
beforeTestMethod
(TestContext testContext) The default implementation is empty.int
getOrder()
Executes beforeBeanOverrideTestExecutionListener
.Methods inherited from class org.springframework.test.context.support.AbstractTestExecutionListener
afterTestClass, afterTestExecution, beforeTestClass, beforeTestExecution, prepareTestInstance
-
Constructor Details
-
MockitoResetTestExecutionListener
public MockitoResetTestExecutionListener()
-
-
Method Details
-
getOrder
public int getOrder()Executes beforeBeanOverrideTestExecutionListener
.- Specified by:
getOrder
in interfaceOrdered
- Overrides:
getOrder
in classAbstractTestExecutionListener
- Returns:
- the order value
- See Also:
-
beforeTestMethod
Description copied from class:AbstractTestExecutionListener
The default implementation is empty. Can be overridden by subclasses as necessary.- Specified by:
beforeTestMethod
in interfaceTestExecutionListener
- Overrides:
beforeTestMethod
in classAbstractTestExecutionListener
- Parameters:
testContext
- the test context in which the test method will be executed; nevernull
- Throws:
Exception
- allows any exception to propagate- See Also:
-
afterTestMethod
Description copied from class:AbstractTestExecutionListener
The default implementation is empty. Can be overridden by subclasses as necessary.- Specified by:
afterTestMethod
in interfaceTestExecutionListener
- Overrides:
afterTestMethod
in classAbstractTestExecutionListener
- Parameters:
testContext
- the test context in which the test method was executed; nevernull
- Throws:
Exception
- allows any exception to propagate- See Also:
-