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, Sam Brannen
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Theorder
value for this listener (Ordered.LOWEST_PRECEDENCE - 100
): 2147483547.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()
Returns 2147483547, which ensures that theMockitoResetTestExecutionListener
is ordered after all standardTestExecutionListener
implementations.Methods inherited from class org.springframework.test.context.support.AbstractTestExecutionListener
afterTestClass, afterTestExecution, beforeTestClass, beforeTestExecution, prepareTestInstance
-
Field Details
-
ORDER
public static final int ORDERTheorder
value for this listener (Ordered.LOWEST_PRECEDENCE - 100
): 2147483547.- Since:
- 6.2.3
- See Also:
-
-
Constructor Details
-
MockitoResetTestExecutionListener
public MockitoResetTestExecutionListener()
-
-
Method Details
-
getOrder
public int getOrder()Returns 2147483547, which ensures that theMockitoResetTestExecutionListener
is ordered after all standardTestExecutionListener
implementations.- 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
- 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
- See Also:
-