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 intTheordervalue for this listener (Ordered.LOWEST_PRECEDENCE - 100): 2147483547.Fields inherited from interface Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterTestMethod(TestContext testContext) The default implementation is empty.voidbeforeTestMethod(TestContext testContext) The default implementation is empty.intgetOrder()Returns 2147483547, which ensures that theMockitoResetTestExecutionListeneris ordered after all standardTestExecutionListenerimplementations.Methods inherited from class AbstractTestExecutionListener
afterTestClass, afterTestExecution, beforeTestClass, beforeTestExecution, prepareTestInstance
-
Field Details
-
ORDER
public static final int ORDERTheordervalue 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 theMockitoResetTestExecutionListeneris ordered after all standardTestExecutionListenerimplementations.- Specified by:
getOrderin interfaceOrdered- Overrides:
getOrderin classAbstractTestExecutionListener- Returns:
- the order value
- See Also:
-
beforeTestMethod
Description copied from class:AbstractTestExecutionListenerThe default implementation is empty. Can be overridden by subclasses as necessary.- Specified by:
beforeTestMethodin interfaceTestExecutionListener- Overrides:
beforeTestMethodin classAbstractTestExecutionListener- Parameters:
testContext- the test context in which the test method will be executed; nevernull- See Also:
-
afterTestMethod
Description copied from class:AbstractTestExecutionListenerThe default implementation is empty. Can be overridden by subclasses as necessary.- Specified by:
afterTestMethodin interfaceTestExecutionListener- Overrides:
afterTestMethodin classAbstractTestExecutionListener- Parameters:
testContext- the test context in which the test method was executed; nevernull- See Also:
-