Package | Description |
---|---|
org.mockito |
Mockito is a mock library for java - see
Mockito class for usage. |
org.mockito.invocation |
Public API related to mock method invocations.
|
org.mockito.listeners |
Public classes relative to the listener APIs.
|
org.mockito.stubbing |
Stubbing related classes.
|
Modifier and Type | Method and Description |
---|---|
Collection<Invocation> |
MockingDetails.getInvocations()
All method invocations on this mock.
|
Modifier and Type | Method and Description |
---|---|
Invocation |
InvocationFactory.createInvocation(Object target,
MockCreationSettings settings,
Method method,
Callable realMethod,
Object... args)
Deprecated.
Use
InvocationFactory.createInvocation(Object, MockCreationSettings, Method, RealMethodBehavior, Object...) instead.
Why deprecated? We found use cases where we need to handle Throwable and ensure correct stack trace filtering
(removing Mockito internals from the stack trace). Hence the introduction of InvocationFactory.RealMethodBehavior .
Creates instance of an Invocation object.
This method is useful for framework integrators to programmatically simulate method calls on mocks using MockHandler .
It enables advanced framework integrations. |
Invocation |
InvocationFactory.createInvocation(Object target,
MockCreationSettings settings,
Method method,
InvocationFactory.RealMethodBehavior realMethod,
Object... args)
Creates instance of an
Invocation object. |
Invocation |
MatchableInvocation.getInvocation()
The actual invocation Mockito will match against.
|
Modifier and Type | Method and Description |
---|---|
void |
MatchableInvocation.captureArgumentsFrom(Invocation invocation)
This method is used by Mockito to implement argument captor functionality (see
ArgumentCaptor . |
Object |
MockHandler.handle(Invocation invocation)
Takes an invocation object and handles it.
|
boolean |
MatchableInvocation.hasSameMethod(Invocation candidate)
Returns true if the candidate invocation has the same method (method name and parameter types)
|
boolean |
MatchableInvocation.hasSimilarMethod(Invocation candidate)
Candidate invocation has the similar method.
|
boolean |
MatchableInvocation.matches(Invocation candidate)
Same method, mock and all arguments match.
|
Modifier and Type | Method and Description |
---|---|
Invocation |
StubbingLookupEvent.getInvocation() |
Modifier and Type | Method and Description |
---|---|
Invocation |
Stubbing.getInvocation()
Returns the method invocation that is stubbed.
|