Class ResetMocksTestExecutionListener
java.lang.Object
org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener
- All Implemented Interfaces:
Ordered
,TestExecutionListener
TestExecutionListener
to reset any mock beans that have been marked with a
MockReset
. Typically used alongside MockitoTestExecutionListener
.- Since:
- 1.4.0
- Author:
- Phillip Webb
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterTestMethod
(TestContext testContext) void
beforeTestMethod
(TestContext testContext) int
getOrder()
Methods inherited from class org.springframework.test.context.support.AbstractTestExecutionListener
afterTestClass, afterTestExecution, beforeTestClass, beforeTestExecution, prepareTestInstance
-
Constructor Details
-
ResetMocksTestExecutionListener
public ResetMocksTestExecutionListener()
-
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrder
in interfaceOrdered
- Overrides:
getOrder
in classAbstractTestExecutionListener
-
beforeTestMethod
- Specified by:
beforeTestMethod
in interfaceTestExecutionListener
- Overrides:
beforeTestMethod
in classAbstractTestExecutionListener
- Throws:
Exception
-
afterTestMethod
- Specified by:
afterTestMethod
in interfaceTestExecutionListener
- Overrides:
afterTestMethod
in classAbstractTestExecutionListener
- Throws:
Exception
-