T
- The type of objectpublic class EqualFieldsMatcher<T>
extends org.hamcrest.BaseMatcher<T>
Constructor and Description |
---|
EqualFieldsMatcher(T expected)
Initializes an EqualFieldsMatcher that will match an object with equal properties as the given
expected object. |
EqualFieldsMatcher(T expected,
FieldFilter filter)
Initializes an EqualFieldsMatcher that will match an object with equal properties as the given
expected object. |
Modifier and Type | Method and Description |
---|---|
void |
describeTo(org.hamcrest.Description description) |
Field |
getFailedField()
Returns the field that failed comparison, if any.
|
Object |
getFailedFieldActualValue()
Returns the actual value of a failed field comparison, if any.
|
Object |
getFailedFieldExpectedValue()
Returns the expected value of a failed field comparison, if any.
|
boolean |
matches(Object item) |
public EqualFieldsMatcher(T expected)
expected
object.expected
- The expected objectpublic EqualFieldsMatcher(T expected, FieldFilter filter)
expected
object.expected
- The expected objectfilter
- The filter describing the fields to include in the comparisonpublic boolean matches(Object item)
public Field getFailedField()
matches(Object)
is
called and a mismatch has been detected.public Object getFailedFieldExpectedValue()
matches(Object)
is called and a mismatch has been detected.public Object getFailedFieldActualValue()
matches(Object)
is called and a mismatch has been detected.public void describeTo(org.hamcrest.Description description)
Copyright © 2010–2020. All rights reserved.