public class InvocationMatcher extends java.lang.Object implements DescribedInvocation, CapturesArgumensFromInvocation, java.io.Serializable
| Constructor and Description |
|---|
InvocationMatcher(Invocation invocation) |
InvocationMatcher(Invocation invocation,
java.util.List<org.hamcrest.Matcher> matchers) |
| Modifier and Type | Method and 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 PrintableInvocationtoString in interface DescribedInvocationtoString 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 PrintableInvocationgetLocation in interface DescribedInvocationpublic void captureArgumentsFrom(Invocation invocation)
captureArgumentsFrom in interface CapturesArgumensFromInvocationpublic static java.util.List<InvocationMatcher> createFrom(java.util.List<Invocation> invocations)