|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.easymock.AbstractMatcher
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.
public abstract class AbstractMatcher
A convenience implementation of ArgumentsMatcher
. A subclass that
does not redefine any method will behave like
MockControl.EQUALS_MATCHER
.
Constructor Summary | |
---|---|
AbstractMatcher()
Deprecated. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMatcher()
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |