|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hamcrest.BaseMatcher<T> org.hamcrest.TypeSafeDiagnosingMatcher<T> org.hamcrest.beans.SamePropertyValuesAs<T>
public class SamePropertyValuesAs<T>
Nested Class Summary | |
---|---|
static class |
SamePropertyValuesAs.PropertyMatcher
|
Constructor Summary | |
---|---|
SamePropertyValuesAs(T expectedBean)
|
Method Summary | ||
---|---|---|
void |
describeTo(Description description)
Generates a description of the object. |
|
boolean |
matchesSafely(T bean,
Description mismatch)
Subclasses should implement this. |
|
static
|
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. |
Methods inherited from class org.hamcrest.TypeSafeDiagnosingMatcher |
---|
describeMismatch, matches |
Methods inherited from class org.hamcrest.BaseMatcher |
---|
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SamePropertyValuesAs(T expectedBean)
Method Detail |
---|
public boolean matchesSafely(T bean, Description mismatch)
TypeSafeDiagnosingMatcher
matchesSafely
in class TypeSafeDiagnosingMatcher<T>
public void describeTo(Description description)
SelfDescribing
description
- The description to be built or appended to.public static <T> Matcher<T> samePropertyValuesAs(T expectedBean)
For example:
assertThat(myBean, samePropertyValuesAs(myExpectedBean))
expectedBean
- the bean against which examined beans are compared
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |