ArgumentsMatcher
s are only supported
for the legacy MockControl
. For mock objects generated by the methods
on EasyMock
, there are per-argument matchers available. For more
information, see the EasyMock documentation.@Deprecated public abstract class AbstractMatcher extends java.lang.Object implements ArgumentsMatcher, java.io.Serializable
ArgumentsMatcher
. A subclass that
does not redefine any method will behave like
MockControl.EQUALS_MATCHER
.Constructor and Description |
---|
AbstractMatcher()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
argumentMatches(java.lang.Object expected,
java.lang.Object actual)
Deprecated.
Checks whether an expected argument matches an actual argument; the method
is used by
matches(Object[], Object[]) . |
protected java.lang.String |
argumentToString(java.lang.Object argument)
Deprecated.
Converts an argument to a String, used by
toString(Object[]) . |
boolean |
matches(java.lang.Object[] expected,
java.lang.Object[] actual)
Deprecated.
Checks whether an expected argument array matches an actual argument array.
|
java.lang.String |
toString(java.lang.Object[] arguments)
Deprecated.
Returns a string representation of the matcher.
|
protected boolean argumentMatches(java.lang.Object expected, java.lang.Object actual)
matches(Object[], Object[])
. The arguments
provided to this method are always not null
.expected
- the expected argument.actual
- the actual argument.protected java.lang.String argumentToString(java.lang.Object argument)
toString(Object[])
.argument
- the argument to convert to a String.String
representation of the argument.public boolean matches(java.lang.Object[] expected, java.lang.Object[] actual)
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.matches
in interface ArgumentsMatcher
expected
- the expected arguments.actual
- the actual arguments.public java.lang.String toString(java.lang.Object[] arguments)
argumentToString(Object)
for every argument in the given array and returns the string representations
of the arguments separated by commas.toString
in interface ArgumentsMatcher
arguments
- the arguments to be used in the string representation.Copyright © 2001-2009 OFFIS, Tammo Freese, Henri Tremblay. This documentation is provided under the terms of the MIT licence.]]>