public class VerificationDataImpl extends Object implements VerificationData
| Constructor and Description |
|---|
VerificationDataImpl(InvocationContainerImpl invocations,
InvocationMatcher wanted) |
| Modifier and Type | Method and Description |
|---|---|
List<Invocation> |
getAllInvocations()
All invocations recorded on the mock object that is being verified.
|
MatchableInvocation |
getTarget()
The target or wanted invocation.
|
InvocationMatcher |
getWanted() |
public VerificationDataImpl(InvocationContainerImpl invocations, InvocationMatcher wanted)
public List<Invocation> getAllInvocations()
VerificationDatagetAllInvocations in interface VerificationDatapublic MatchableInvocation getTarget()
VerificationData
mock.foo(); // <- invocation 1
mock.bar(); // <- invocation 2
verify(mock).bar(); // <- target invocation
Target invocation can contain argument matchers therefore the returned type is MatchableInvocation
and not Invocation.getTarget in interface VerificationDatapublic InvocationMatcher getWanted()
getWanted in interface VerificationDataCopyright © 2024. All rights reserved.