MockSettings |
MockSettings.defaultAnswer(Answer defaultAnswer) |
Specifies default answers to interactions.
|
MockSettings |
MockSettings.extraInterfaces(Class<?>... interfaces) |
Specifies extra interfaces the mock should implement.
|
MockSettings |
MockSettings.genericTypeToMock(Type genericTypeToMock) |
Specifies the generic type of the mock, preserving the information lost to Java type erasure.
|
MockSettings |
MockSettings.invocationListeners(InvocationListener... listeners) |
Registers a listener for method invocations on this mock.
|
MockSettings |
MockSettings.lenient() |
Deprecated.
|
MockSettings |
MockSettings.mockMaker(String mockMaker) |
Specifies the MockMaker for the mock.
|
MockSettings |
MockSettings.name(String name) |
Specifies mock name.
|
MockSettings |
MockSettings.outerInstance(Object outerClassInstance) |
|
MockSettings |
MockSettings.serializable() |
Configures the mock to be serializable.
|
MockSettings |
MockSettings.serializable(SerializableMode mode) |
Configures the mock to be serializable with a specific serializable mode.
|
MockSettings |
MockSettings.spiedInstance(Object instance) |
Specifies the instance to spy on.
|
MockSettings |
MockSettings.strictness(Strictness strictness) |
Specifies strictness level for the mock.
|
MockSettings |
MockSettings.stubbingLookupListeners(StubbingLookupListener... listeners) |
Add stubbing lookup listener to the mock object.
|
MockSettings |
MockSettings.stubOnly() |
A stub-only mock does not record method
invocations, thus saving memory but
disallowing verification of invocations.
|
MockSettings |
MockSettings.useConstructor(Object... args) |
Mockito attempts to use constructor when creating instance of the mock.
|
MockSettings |
MockSettings.verboseLogging() |
Enables real-time logging of method invocations on this mock.
|
MockSettings |
MockSettings.verificationStartedListeners(VerificationStartedListener... listeners) |
Registers a listener(s) that will be notified when user starts verification.
|
MockSettings |
MockSettings.withoutAnnotations() |
By default, Mockito makes an attempt to preserve all annotation metadata on the mocked
type and its methods to mirror the mocked type as closely as possible.
|
static MockSettings |
Mockito.withSettings() |
Allows mock creation with additional mock settings.
|