org.mockito.internal.invocation
public class InvocationMatcher extends Object implements DescribedInvocation, CapturesArgumentsFromInvocation, Serializable
Constructor and Description |
---|
InvocationMatcher(Invocation invocation) |
InvocationMatcher(Invocation invocation,
List<ArgumentMatcher> matchers) |
Modifier and Type | Method and Description |
---|---|
void |
captureArgumentsFrom(Invocation invocation) |
static List<InvocationMatcher> |
createFrom(List<Invocation> invocations) |
Invocation |
getInvocation() |
Location |
getLocation()
The place in the code where the invocation happened.
|
List<ArgumentMatcher> |
getMatchers() |
Method |
getMethod() |
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 overloaded
|
boolean |
matches(Invocation actual) |
String |
toString()
Describes the invocation in the human friendly way.
|
public InvocationMatcher(Invocation invocation, List<ArgumentMatcher> matchers)
public InvocationMatcher(Invocation invocation)
public Method getMethod()
public Invocation getInvocation()
public List<ArgumentMatcher> getMatchers()
public String toString()
DescribedInvocation
toString
in interface DescribedInvocation
toString
in class Object
public boolean matches(Invocation actual)
public boolean hasSimilarMethod(Invocation candidate)
public boolean hasSameMethod(Invocation candidate)
public Location getLocation()
DescribedInvocation
getLocation
in interface DescribedInvocation
public void captureArgumentsFrom(Invocation invocation)
captureArgumentsFrom
in interface CapturesArgumentsFromInvocation
public static List<InvocationMatcher> createFrom(List<Invocation> invocations)