org.mockito.internal.invocation
Class InvocationMatcher
java.lang.Object
org.mockito.internal.invocation.InvocationMatcher
- All Implemented Interfaces:
- java.io.Serializable, PrintableInvocation, CapturesArgumensFromInvocation, PrintingFriendlyInvocation
- Direct Known Subclasses:
- StubbedInvocationMatcher
public class InvocationMatcher
- extends java.lang.Object
- implements PrintableInvocation, PrintingFriendlyInvocation, CapturesArgumensFromInvocation, java.io.Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
InvocationMatcher
public InvocationMatcher(Invocation invocation,
java.util.List<org.hamcrest.Matcher> matchers)
InvocationMatcher
public InvocationMatcher(Invocation invocation)
getMethod
public java.lang.reflect.Method getMethod()
getInvocation
public Invocation getInvocation()
getMatchers
public java.util.List<org.hamcrest.Matcher> getMatchers()
toString
public java.lang.String toString()
- Specified by:
toString
in interface PrintableInvocation
- Overrides:
toString
in class java.lang.Object
matches
public boolean matches(Invocation actual)
hasSimilarMethod
public boolean hasSimilarMethod(Invocation candidate)
- similar means the same method name, same mock, unverified
and: if arguments are the same cannot be overloaded
hasSameMethod
public boolean hasSameMethod(Invocation candidate)
getLocation
public Location getLocation()
- Specified by:
getLocation
in interface PrintableInvocation
toString
public java.lang.String toString(PrintSettings printSettings)
- Specified by:
toString
in interface PrintingFriendlyInvocation
captureArgumentsFrom
public void captureArgumentsFrom(Invocation i)
- Specified by:
captureArgumentsFrom
in interface CapturesArgumensFromInvocation
createFrom
public static java.util.List<InvocationMatcher> createFrom(java.util.List<Invocation> invocations)