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()
DescribedInvocation
toString
in interface PrintableInvocation
toString
in interface DescribedInvocation
toString
in class java.lang.Object
public boolean matches(Invocation actual)
public boolean hasSimilarMethod(Invocation candidate)
public boolean hasSameMethod(Invocation candidate)
public Location getLocation()
DescribedInvocation
getLocation
in interface PrintableInvocation
getLocation
in interface DescribedInvocation
public void captureArgumentsFrom(Invocation invocation)
captureArgumentsFrom
in interface CapturesArgumensFromInvocation
public static java.util.List<InvocationMatcher> createFrom(java.util.List<Invocation> invocations)