org.mockito
public interface MockingDetails
Modifier and Type | Method and Description |
---|---|
Collection<Invocation> |
getInvocations()
All method invocations on this mock.
|
MockCreationSettings<?> |
getMockCreationSettings()
Returns various mock settings provided when the mock was created, for example:
mocked class, mock name (if any), any extra interfaces (if any), etc.
|
boolean |
isMock()
Informs if the object is a mock.
|
boolean |
isSpy()
Informs if the object is a spy.
|
boolean isMock()
boolean isSpy()
Collection<Invocation> getInvocations()
This method is useful for framework integrators and for certain edge cases.
MockCreationSettings<?> getMockCreationSettings()
MockCreationSettings
.
This method is useful for framework integrators and for certain edge cases.
If null
or non-mock was passed to Mockito.mockingDetails(Object)
then this method will throw with an appropriate exception.
After all, non-mock objects do not have any mock creation settings.