Class VerificationDataImpl
- java.lang.Object
-
- org.mockito.internal.verification.VerificationDataImpl
-
- All Implemented Interfaces:
VerificationData
public class VerificationDataImpl extends java.lang.Object implements VerificationData
-
-
Field Summary
Fields Modifier and Type Field Description private InvocationContainerImpl
invocations
private InvocationMatcher
wanted
-
Constructor Summary
Constructors Constructor Description VerificationDataImpl(InvocationContainerImpl invocations, InvocationMatcher wanted)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Field Detail
-
wanted
private final InvocationMatcher wanted
-
invocations
private final InvocationContainerImpl invocations
-
-
Constructor Detail
-
VerificationDataImpl
public VerificationDataImpl(InvocationContainerImpl invocations, InvocationMatcher wanted)
-
-
Method Detail
-
getAllInvocations
public java.util.List<Invocation> getAllInvocations()
Description copied from interface:VerificationData
All invocations recorded on the mock object that is being verified. Does not include invocations recorded on other mock objects.- Specified by:
getAllInvocations
in interfaceVerificationData
-
getTarget
public MatchableInvocation getTarget()
Description copied from interface:VerificationData
The target or wanted invocation. Below example illustrates what is the 'target' invocation:
Target invocation can contain argument matchers therefore the returned type ismock.foo(); // <- invocation 1 mock.bar(); // <- invocation 2 verify(mock).bar(); // <- target invocation
MatchableInvocation
and notInvocation
.- Specified by:
getTarget
in interfaceVerificationData
-
getWanted
public InvocationMatcher getWanted()
- Specified by:
getWanted
in interfaceVerificationData
-
assertWantedIsVerifiable
private void assertWantedIsVerifiable()
-
-