public interface MockCreationSettings<T>
MockSettings.| Modifier and Type | Method and Description |
|---|---|
Object[] |
getConstructorArgs()
Used when arguments should be passed to the mocked object's constructor, regardless of whether these
arguments are supplied directly, or whether they include the outer instance.
|
Answer<?> |
getDefaultAnswer()
the default answer for this mock, see
MockSettings.defaultAnswer(org.mockito.stubbing.Answer). |
Set<Class<?>> |
getExtraInterfaces()
the extra interfaces the mock object should implement.
|
List<InvocationListener> |
getInvocationListeners()
The invocation listeners attached to this mock, see
MockSettings.invocationListeners(org.mockito.listeners.InvocationListener...). |
MockName |
getMockName()
the name of this mock, as printed on verification errors; see
MockSettings.name(java.lang.String). |
Object |
getOuterClassInstance()
Used when mocking non-static inner classes in conjunction with
isUsingConstructor() |
SerializableMode |
getSerializableMode() |
Object |
getSpiedInstance()
the spied instance - needed for spies.
|
Class<T> |
getTypeToMock()
Mocked type.
|
boolean |
isSerializable()
if the mock is serializable, see
MockSettings.serializable(). |
boolean |
isStubOnly()
Whether the mock is only for stubbing, i.e.
|
boolean |
isUsingConstructor()
Informs whether the mock instance should be created via constructor
|
Class<T> getTypeToMock()
Set<Class<?>> getExtraInterfaces()
MockName getMockName()
MockSettings.name(java.lang.String).Answer<?> getDefaultAnswer()
MockSettings.defaultAnswer(org.mockito.stubbing.Answer).Object getSpiedInstance()
boolean isSerializable()
MockSettings.serializable().SerializableMode getSerializableMode()
boolean isStubOnly()
List<InvocationListener> getInvocationListeners()
MockSettings.invocationListeners(org.mockito.listeners.InvocationListener...).@Incubating boolean isUsingConstructor()
@Incubating Object[] getConstructorArgs()
getOuterClassInstance() is available, it is prepended to the passed arguments.@Incubating Object getOuterClassInstance()
isUsingConstructor()