|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.testinfected.hamcrest.jpa.PersistenceMatchers
public class PersistenceMatchers
A collection of hamcrest matchers to validate field values of persistent objects.
| Method Summary | ||
|---|---|---|
static
|
componentEqualTo(T component)
Checks that a component (aka value object) is equal to another given component. |
|
static
|
hasField(java.lang.String field)
Checks that an entity has a given field, whatever its value. |
|
static
|
hasField(java.lang.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
|
samePersistentFieldsAs(T entity)
Checks that an entity has the same persistent field values than another entity. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T,U> org.hamcrest.Matcher<T> hasField(java.lang.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(java.lang.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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||