org.easymock
public abstract class AbstractMatcher extends Object implements ArgumentsMatcher
Method Summary | |
---|---|
protected boolean | argumentMatches(Object expected, Object actual)
Compares two arguments; used by
(Object[], Object[]) . |
protected String | argumentToString(Object argument)
Converts an argument to a String, used by
(Object[]) .
|
boolean | matches(Object[] expected, Object[] actual)
Matches two arrays of arguments. |
String | toString(Object[] arguments)
Returns a string representation of the matcher. |
(Object[], Object[])
. The arguments
provided to this method are always not null
.
Parameters: expected the expected argument. actual the actual argument.
Returns: true if the arguments match, false otherwise.
(Object[])
.
Parameters: argument the argument to convert to a String.
Returns: a String
representation of the argument.
argumentMatches(Object, Object)
to check whether arguments
pairs match. If all the arguments match, true is returned, otherwise
false. In two cases, argumentMatches(Object, Object)
is
not called: If both argument arrays are null, they match; if one and only
one is null, they do not match.
Parameters: expected the expected arguments. actual the actual arguments.
Returns: true if the arguments match, false otherwise.
Parameters: arguments the arguments to be used in the string representation.
Returns: a string representation of the matcher.