MockitoTestExecutionListener

TestExecutionListener to enable @MockBean and @SpyBean support. Also triggers openMocks when any Mockito annotations used, primarily to allow @Captor annotations.

To use the automatic reset support of @MockBean and @SpyBean, configure ResetMocksTestExecutionListener as well.

Author

Phillip Webb

Andy Wilkinson

Moritz Halbritter

Since

1.4.2

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val HIGHEST_PRECEDENCE: Int = -2147483648
Link copied to clipboard
val LOWEST_PRECEDENCE: Int = 2147483647

Functions

Link copied to clipboard
open fun afterTestClass(testContext: TestContext)
Link copied to clipboard
open fun afterTestExecution(testContext: TestContext)
Link copied to clipboard
open fun afterTestMethod(testContext: TestContext)
Link copied to clipboard
open fun beforeTestClass(testContext: TestContext)
Link copied to clipboard
open fun beforeTestExecution(testContext: TestContext)
Link copied to clipboard
open fun beforeTestMethod(testContext: TestContext)
Link copied to clipboard
fun getOrder(): Int
Link copied to clipboard
open fun prepareTestInstance(testContext: TestContext)