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()
DescribedInvocationtoString in interface DescribedInvocationtoString in class Objectpublic boolean matches(Invocation actual)
public boolean hasSimilarMethod(Invocation candidate)
public boolean hasSameMethod(Invocation candidate)
public Location getLocation()
DescribedInvocationgetLocation in interface DescribedInvocationpublic void captureArgumentsFrom(Invocation invocation)
captureArgumentsFrom in interface CapturesArgumentsFromInvocationpublic static List<InvocationMatcher> createFrom(List<Invocation> invocations)