public class SamePropertyValuesAs<T> extends TypeSafeDiagnosingMatcher<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
SamePropertyValuesAs.PropertyMatcher |
| Constructor and Description |
|---|
SamePropertyValuesAs(T expectedBean) |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(Description description)
Generates a description of the object.
|
boolean |
matchesSafely(T bean,
Description mismatch)
Subclasses should implement this.
|
static <T> Matcher<T> |
samePropertyValuesAs(T expectedBean)
Creates a matcher that matches when the examined object has values for all of
its JavaBean properties that are equal to the corresponding values of the
specified bean.
|
describeMismatch, matches_dont_implement_Matcher___instead_extend_BaseMatcher_, toStringpublic SamePropertyValuesAs(T expectedBean)
public boolean matchesSafely(T bean, Description mismatch)
TypeSafeDiagnosingMatchermatchesSafely in class TypeSafeDiagnosingMatcher<T>public void describeTo(Description description)
SelfDescribingdescription - The description to be built or appended to.public static <T> Matcher<T> samePropertyValuesAs(T expectedBean)
assertThat(myBean, samePropertyValuesAs(myExpectedBean))
expectedBean - the bean against which examined beans are compared