class NullResultGuardian<T> extends java.lang.Object implements MockHandler<T>
| Modifier and Type | Field and Description |
|---|---|
private MockHandler<T> |
delegate |
| Constructor and Description |
|---|
NullResultGuardian(MockHandler<T> delegate) |
| Modifier and Type | Method and Description |
|---|---|
InvocationContainer |
getInvocationContainer()
Returns the object that holds all invocations on the mock object,
including stubbings with declared answers.
|
MockCreationSettings<T> |
getMockSettings()
Read-only settings the mock object was created with.
|
java.lang.Object |
handle(Invocation invocation)
Takes an invocation object and handles it.
|
private final MockHandler<T> delegate
public NullResultGuardian(MockHandler<T> delegate)
public java.lang.Object handle(Invocation invocation) throws java.lang.Throwable
MockHandlerThe default implementation provided by Mockito handles invocations by recording method calls on mocks for further verification, captures the stubbing information when mock is stubbed, returns the stubbed values for invocations that have been stubbed, and much more.
handle in interface MockHandler<T>invocation - The invocation to handlejava.lang.Throwable - Throwablepublic MockCreationSettings<T> getMockSettings()
MockHandlerMockito.mock(Class, MockSettings)getMockSettings in interface MockHandler<T>public InvocationContainer getInvocationContainer()
MockHandler
Please do not provide your own implementation of InvocationContainer interface at this point.
If you have a use case that requires your own implementation of InvocationContainer
please reach out to us. You can open a ticket in our issue tracker to start a discussion.
getInvocationContainer in interface MockHandler<T>