public final class MockitoJUnit extends Object
MockitoRule
MockitoJUnitRunner
Modifier and Type | Method and Description |
---|---|
static VerificationCollector |
collector()
Creates a rule instance that can perform lazy verifications.
|
static MockitoRule |
rule()
Creates rule instance that initiates @Mocks
For more details and examples see
MockitoRule . |
static MockitoTestRule |
testRule(Object testInstance)
Creates a rule instance that initiates @Mocks and is a
TestRule . |
public static MockitoRule rule()
MockitoRule
.public static MockitoTestRule testRule(Object testInstance)
TestRule
. Use this method
only when you need to explicitly need a TestRule
, for example if you need to compose
multiple rules using a RuleChain
. Otherwise, always prefer rule()
See MockitoRule
.testInstance
- The instance to initiate mocks for@Incubating public static VerificationCollector collector()
VerificationCollector