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 TypeMethodDescriptionvoid
captureArgumentsFrom
(Invocation invocation) static List<InvocationMatcher>
createFrom
(List<Invocation> invocations) The place in the code where the invocation happened.List<org.hamcrest.Matcher>
boolean
hasSameMethod
(Invocation candidate) boolean
hasSimilarMethod
(Invocation candidate) similar means the same method name, same mock, unverified and: if arguments are the same cannot be overloadedboolean
matches
(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:DescribedInvocation
Describes the invocation in the human friendly way.- Specified by:
toString
in interfaceDescribedInvocation
- Specified by:
toString
in interfacePrintableInvocation
- Overrides:
toString
in 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:DescribedInvocation
The place in the code where the invocation happened.- Specified by:
getLocation
in interfaceDescribedInvocation
- Specified by:
getLocation
in interfacePrintableInvocation
- Returns:
- the location of the invocation.
-
captureArgumentsFrom
- Specified by:
captureArgumentsFrom
in interfaceCapturesArgumensFromInvocation
-
createFrom
-