public class TypeMatcher extends AbstractArgumentMatcher
ArgumentMatcher that only compares the types of
the two objects, not their actual values. This is useful for Throwable arguments, (since
Throwables rarely implement a useful equals). This allows a check that the right
type of exception was passed in (even if it doesn't check that the exception's message and other
properties are correct).| Constructor and Description |
|---|
TypeMatcher() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareArguments(java.lang.Object expected,
java.lang.Object actual)
Compares an expected argument value (provided when training the mock object), against the
actual argument value.
|
argumentMatchespublic TypeMatcher()
public boolean compareArguments(java.lang.Object expected, java.lang.Object actual)
ArgumentMatcherequals()).expected - The expected argument valueactual - The actual argument value