Package | Description |
---|---|
org.mockito |
Mockito is a mock library for java - see Mockito class for for usage.
|
org.mockito.junit | |
org.mockito.mock | |
org.mockito.plugins |
Mockito plugins allow customization of behavior.
|
Modifier and Type | Interface and Description |
---|---|
interface |
MockitoFramework
Mockito framework settings and lifecycle listeners, for advanced users or for integrating with other frameworks.
|
Modifier and Type | Method and Description |
---|---|
void |
MockitoFramework.addListener(MockitoListener listener)
Adds listener to Mockito.
|
static MockitoFramework |
Mockito.framework()
For advanced users or framework integrators.
|
MockSettings |
MockSettings.outerInstance(Object outerClassInstance)
Makes it possible to mock non-static inner classes in conjunction with
MockSettings.useConstructor() . |
void |
MockitoFramework.removeListener(MockitoListener listener)
When you add listener using
MockitoFramework.addListener(MockitoListener) make sure to remove it. |
static <T> T |
Mockito.spy(Class<T> classToSpy)
Please refer to the documentation of
Mockito.spy(Object) . |
MockSettings |
MockSettings.useConstructor()
Mockito attempts to use constructor when creating instance of the mock.
|
Modifier and Type | Interface and Description |
---|---|
interface |
VerificationCollector
Use this rule in order to collect multiple verification failures and report at once.
|
Modifier and Type | Method and Description |
---|---|
VerificationCollector |
VerificationCollector.assertLazily()
Enforce all verifications are performed lazily.
|
void |
VerificationCollector.collectAndReport()
Collect all lazily verified behaviour.
|
static VerificationCollector |
MockitoJUnit.collector()
Creates a rule instance that can perform lazy verifications.
|
Modifier and Type | Class and Description |
---|---|
class |
SerializableMode
Mock serializable style.
|
Modifier and Type | Method and Description |
---|---|
Object |
MockCreationSettings.getOuterClassInstance()
Used when mocking non-static inner classes in conjunction with
MockCreationSettings.isUsingConstructor() |
boolean |
MockCreationSettings.isUsingConstructor()
Informs whether the mock instance should be created via constructor
|
Modifier and Type | Interface and Description |
---|---|
static interface |
MockMaker.TypeMockability
Carries the mockability information
|
interface |
PluginSwitch
Allows switching off the plugins that are discovered on classpath.
|
Modifier and Type | Method and Description |
---|---|
MockMaker.TypeMockability |
MockMaker.isTypeMockable(Class<?> type)
Indicates if the given type can be mocked by this mockmaker.
|