public class InvocationMatcher extends java.lang.Object implements PrintableInvocation, PrintingFriendlyInvocation, 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 i) |
static java.util.List<InvocationMatcher> |
createFrom(java.util.List<Invocation> invocations) |
Invocation |
getInvocation() |
Location |
getLocation() |
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() |
java.lang.String |
toString(PrintSettings printSettings) |
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()
toString 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()
getLocation in interface PrintableInvocationpublic java.lang.String toString(PrintSettings printSettings)
toString in interface PrintingFriendlyInvocationpublic void captureArgumentsFrom(Invocation i)
captureArgumentsFrom in interface CapturesArgumensFromInvocationpublic static java.util.List<InvocationMatcher> createFrom(java.util.List<Invocation> invocations)