| Modifier and Type | Class and Description |
|---|---|
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| private final T | |
| private final List | |
| private final Set |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | describeTo(Description
The description to be built or appended to. description)Implements org. |
| private boolean | |
| private boolean | |
| private boolean | |
| public boolean | matchesSafely(T bean, Description mismatch)
Implements abstract org. |
| private static <T> List | |
| private static Set | |
| private static Object | |
| public static <T> Matcher | samePropertyValuesAs(T
the bean against which examined beans are compared 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. |
| expectedBean | back to summary |
|---|---|
| private final T expectedBean | |
| propertyMatchers | back to summary |
|---|---|
| private final List<SamePropertyValuesAs. | |
| propertyNames | back to summary |
|---|---|
| private final Set<String> propertyNames | |
| SamePropertyValuesAs | back to summary |
|---|---|
| public SamePropertyValuesAs(T expectedBean) | |
| describeTo | back to summary |
|---|---|
| public void describeTo(Description description) Implements org. Doc from org. Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.
| |
| hasMatchingValues | back to summary |
|---|---|
| private boolean hasMatchingValues(T item, Description mismatchDescription) | |
| hasNoExtraProperties | back to summary |
|---|---|
| private boolean hasNoExtraProperties(T item, Description mismatchDescription) | |
| isCompatibleType | back to summary |
|---|---|
| private boolean isCompatibleType(T item, Description mismatchDescription) | |
| matchesSafely | back to summary |
|---|---|
| public boolean matchesSafely(T bean, Description mismatch) Implements abstract org. Doc from org. Subclasses should implement this. The item will already have been checked for the specific type and will never be null.
| |
| propertyMatchersFor | back to summary |
|---|---|
| private static <T> List | |
| propertyNamesFrom | back to summary |
|---|---|
| private static Set | |
| readProperty | back to summary |
|---|---|
| private static Object readProperty(Method method, Object target) | |
| samePropertyValuesAs | back to summary |
|---|---|
| public static <T> Matcher 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. For example: assertThat(myBean, samePropertyValuesAs(myExpectedBean))
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Matcher | |
| private final String | |
| private final Method |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | describeTo(Description
The description to be built or appended to. description)Implements org. |
| public boolean | matches(Object actual, Description mismatch)
Implements abstract org. |
| matcher | back to summary |
|---|---|
| private final Matcher<Object> matcher | |
| propertyName | back to summary |
|---|---|
| private final String propertyName | |
| readMethod | back to summary |
|---|---|
| private final Method readMethod | |
| PropertyMatcher | back to summary |
|---|---|
| public PropertyMatcher(PropertyDescriptor descriptor, Object expectedObject) | |
| describeTo | back to summary |
|---|---|
| public void describeTo(Description description) Implements org. Doc from org. Generates a description of the object. The description may be part of a a description of a larger object of which this is just a component, so it should be worded appropriately.
| |
| matches | back to summary |
|---|---|
| public boolean matches(Object actual, Description mismatch) Implements abstract org.
| |