Class MockitoTestExecutionListener
- java.lang.Object
- org.springframework.test.context.support.AbstractTestExecutionListener
- org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener
- All Implemented Interfaces:
org.springframework.core.Ordered
,org.springframework.test.context.TestExecutionListener
public class MockitoTestExecutionListener extends org.springframework.test.context.support.AbstractTestExecutionListener
TestExecutionListener
to triggerMockitoAnnotations.initMocks(Object)
when@MockBean
annotations are used. Primarily to allowCaptor
annotations.- Since:
- 1.4.2
Constructor Summary
Constructors Constructor Description MockitoTestExecutionListener()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
prepareTestInstance(org.springframework.test.context.TestContext testContext)
Constructor Detail
MockitoTestExecutionListener
public MockitoTestExecutionListener()
Method Detail
prepareTestInstance
public void prepareTestInstance(org.springframework.test.context.TestContext testContext) throws Exception
- Specified by:
prepareTestInstance
in interfaceorg.springframework.test.context.TestExecutionListener
- Overrides:
prepareTestInstance
in classorg.springframework.test.context.support.AbstractTestExecutionListener
- Throws:
Exception