public class VerificationDataImpl extends java.lang.Object implements VerificationData
| Modifier and Type | Field and Description |
|---|---|
private InvocationContainerImpl |
invocations |
private InvocationMatcher |
wanted |
| Constructor and Description |
|---|
VerificationDataImpl(InvocationContainerImpl invocations,
InvocationMatcher wanted) |
| Modifier and Type | Method and Description |
|---|---|
private void |
assertWantedIsVerifiable() |
java.util.List<Invocation> |
getAllInvocations()
All invocations recorded on the mock object that is being verified.
|
MatchableInvocation |
getTarget()
The target or wanted invocation.
|
InvocationMatcher |
getWanted() |
private final InvocationMatcher wanted
private final InvocationContainerImpl invocations
public VerificationDataImpl(InvocationContainerImpl invocations, InvocationMatcher wanted)
public java.util.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 VerificationDataprivate void assertWantedIsVerifiable()