public class PersistenceMatchers extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> org.hamcrest.Matcher<T> |
componentEqualTo(T component)
Checks that a component (aka value object) is equal to another
given component.
|
static <T> org.hamcrest.Matcher<T> |
hasField(String field)
Checks that an entity has a given field, whatever its value.
|
static <T,U> org.hamcrest.Matcher<T> |
hasField(String field,
org.hamcrest.Matcher<U> value)
Checks that an entity has a field with a value that is matched by the provided matcher.
|
static <T> org.hamcrest.Matcher<T> |
samePersistentFieldsAs(T entity)
Checks that an entity has the same persistent field values
than another entity.
|
public static <T,U> org.hamcrest.Matcher<T> hasField(String field, org.hamcrest.Matcher<U> value)
field - the name of a fieldvalue - a matcher to validate the field value.public static <T> org.hamcrest.Matcher<T> hasField(String field)
field - the name of the expected fieldpublic static <T> org.hamcrest.Matcher<T> componentEqualTo(T component)
component - the component to match against.public static <T> org.hamcrest.Matcher<T> samePersistentFieldsAs(T entity)
entity - the entity to compare to.Copyright © 2015. All Rights Reserved.