public class MockitoTestExecutionListener extends AbstractTestExecutionListener
@MockBean
および @SpyBean
のサポートを有効にする TestExecutionListener
。また、主に @Captor
アノテーションを許可するために、Mockito アノテーションが使用されたときに MockitoAnnotations.openMocks(Object)
をトリガーします。@MockBean
および @SpyBean
の自動リセットサポートを使用するには、ResetMocksTestExecutionListener
も構成します。
ResetMocksTestExecutionListener
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターと説明 |
---|
MockitoTestExecutionListener() |
修飾子と型 | メソッドと説明 |
---|---|
void | afterTestMethod(TestContext testContext) |
void | beforeTestMethod(TestContext testContext) |
int | getOrder() |
void | prepareTestInstance(TestContext testContext) |
afterTestClass, afterTestExecution, beforeTestClass, beforeTestExecution
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public final int getOrder()
Ordered
の getOrder
AbstractTestExecutionListener
の getOrder
public void prepareTestInstance(TestContext testContext) throws ExceptionSE
TestExecutionListener
の prepareTestInstance
AbstractTestExecutionListener
の prepareTestInstance
ExceptionSE
public void beforeTestMethod(TestContext testContext) throws ExceptionSE
TestExecutionListener
の beforeTestMethod
AbstractTestExecutionListener
の beforeTestMethod
ExceptionSE
public void afterTestMethod(TestContext testContext) throws ExceptionSE
TestExecutionListener
の afterTestMethod
AbstractTestExecutionListener
の afterTestMethod
ExceptionSE