Class MockitoTestExecutionListener
java.lang.Object
org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
- All Implemented Interfaces:
Ordered
,TestExecutionListener
@Deprecated(since="3.4.0",
forRemoval=true)
public class MockitoTestExecutionListener
extends AbstractTestExecutionListener
Deprecated, for removal: This API element is subject to removal in a future version.
TestExecutionListener
to enable @MockBean
and
@SpyBean
support.
To use the automatic reset support of @MockBean
and @SpyBean
, configure
ResetMocksTestExecutionListener
as well.
- Since:
- 1.4.2
- Author:
- Phillip Webb, Andy Wilkinson, Moritz Halbritter
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeTestMethod
(TestContext testContext) Deprecated, for removal: This API element is subject to removal in a future version.final int
getOrder()
Deprecated, for removal: This API element is subject to removal in a future version.void
prepareTestInstance
(TestContext testContext) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.springframework.test.context.support.AbstractTestExecutionListener
afterTestClass, afterTestExecution, afterTestMethod, beforeTestClass, beforeTestExecution
-
Constructor Details
-
MockitoTestExecutionListener
public MockitoTestExecutionListener()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
getOrder
public final int getOrder()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getOrder
in interfaceOrdered
- Overrides:
getOrder
in classAbstractTestExecutionListener
-
prepareTestInstance
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
prepareTestInstance
in interfaceTestExecutionListener
- Overrides:
prepareTestInstance
in classAbstractTestExecutionListener
- Throws:
Exception
-
beforeTestMethod
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
beforeTestMethod
in interfaceTestExecutionListener
- Overrides:
beforeTestMethod
in classAbstractTestExecutionListener
- Throws:
Exception
-
MockitoTestExecutionListener