java.io.Serializable, PrintableInvocation, CapturesArgumensFromInvocation, DescribedInvocationStubbedInvocationMatcherpublic class InvocationMatcher extends java.lang.Object implements DescribedInvocation, CapturesArgumensFromInvocation, java.io.Serializable
| Constructor | Description |
|---|---|
InvocationMatcher(Invocation invocation) |
|
InvocationMatcher(Invocation invocation,
java.util.List<org.hamcrest.Matcher> matchers) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
captureArgumentsFrom(Invocation invocation) |
|
static java.util.List<InvocationMatcher> |
createFrom(java.util.List<Invocation> invocations) |
|
Invocation |
getInvocation() |
|
Location |
getLocation() |
The place in the code where the invocation happened.
|
java.util.List<org.hamcrest.Matcher> |
getMatchers() |
|
java.lang.reflect.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) |
|
java.lang.String |
toString() |
Describes the invocation in the human friendly way.
|
public InvocationMatcher(Invocation invocation, java.util.List<org.hamcrest.Matcher> matchers)
public InvocationMatcher(Invocation invocation)
public java.lang.reflect.Method getMethod()
public Invocation getInvocation()
public java.util.List<org.hamcrest.Matcher> getMatchers()
public java.lang.String toString()
DescribedInvocationtoString in interface DescribedInvocationtoString in interface PrintableInvocationtoString in class java.lang.Objectpublic boolean matches(Invocation actual)
public boolean hasSimilarMethod(Invocation candidate)
public boolean hasSameMethod(Invocation candidate)
public Location getLocation()
DescribedInvocationgetLocation in interface DescribedInvocationgetLocation in interface PrintableInvocationpublic void captureArgumentsFrom(Invocation invocation)
captureArgumentsFrom in interface CapturesArgumensFromInvocationpublic static java.util.List<InvocationMatcher> createFrom(java.util.List<Invocation> invocations)