Package org.mockito.internal.invocation
Class InvocationMatcher
java.lang.Object
org.mockito.internal.invocation.InvocationMatcher
- All Implemented Interfaces:
Serializable,PrintableInvocation,CapturesArgumensFromInvocation,DescribedInvocation
- Direct Known Subclasses:
StubbedInvocationMatcher
public class InvocationMatcher
extends Object
implements DescribedInvocation, CapturesArgumensFromInvocation, Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvocationMatcher(Invocation invocation) InvocationMatcher(Invocation invocation, List<org.hamcrest.Matcher> matchers) -
Method Summary
Modifier and TypeMethodDescriptionvoidcaptureArgumentsFrom(Invocation invocation) static List<InvocationMatcher> createFrom(List<Invocation> invocations) The place in the code where the invocation happened.List<org.hamcrest.Matcher> booleanhasSameMethod(Invocation candidate) booleanhasSimilarMethod(Invocation candidate) similar means the same method name, same mock, unverified and: if arguments are the same cannot be overloadedbooleanmatches(Invocation actual) toString()Describes the invocation in the human friendly way.
-
Constructor Details
-
InvocationMatcher
-
InvocationMatcher
-
-
Method Details
-
getMethod
-
getInvocation
-
getMatchers
-
toString
Description copied from interface:DescribedInvocationDescribes the invocation in the human friendly way.- Specified by:
toStringin interfaceDescribedInvocation- Specified by:
toStringin interfacePrintableInvocation- Overrides:
toStringin classObject- Returns:
- the description of this invocation.
-
matches
-
hasSimilarMethod
similar means the same method name, same mock, unverified and: if arguments are the same cannot be overloaded -
hasSameMethod
-
getLocation
Description copied from interface:DescribedInvocationThe place in the code where the invocation happened.- Specified by:
getLocationin interfaceDescribedInvocation- Specified by:
getLocationin interfacePrintableInvocation- Returns:
- the location of the invocation.
-
captureArgumentsFrom
- Specified by:
captureArgumentsFromin interfaceCapturesArgumensFromInvocation
-
createFrom
-