|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.testinfected.hamcrest.validation.ViolationMatchers
public class ViolationMatchers
A collection of hamcrest matchers to validate JSR-303
ConstraintViolations.
| Constructor Summary | |
|---|---|
ViolationMatchers()
|
|
| Method Summary | ||
|---|---|---|
static
|
fails()
Checks that validation fails, i.e. |
|
static
|
on(java.lang.String pathExpression)
Checks that a violation occurs on a given property. |
|
static
|
succeeds()
Checks that violation succeeds, i.e. |
|
static
|
violates(java.util.Collection<org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>> matchers)
Checks that a collection of violations contains at least one violation and that each of the given matchers matches at least one of its elements. |
|
static
|
violates(org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>... matchers)
Checks that a collection of violations contains at least one violation and that each of the given matchers matches at least one of its elements. |
|
static
|
violation(java.util.Collection<org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>> matchers)
Checks that a violation satisfies a set of conditions. |
|
static
|
violation(org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>... matchers)
Checks that a violation satisfies a set of conditions. |
|
static
|
withError(java.lang.String messagePart)
Checks that a violation's error message template contains a given string. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ViolationMatchers()
| Method Detail |
|---|
public static <T> org.hamcrest.Matcher<java.lang.Iterable<javax.validation.ConstraintViolation<T>>> violates(org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>... matchers)
public static <T> org.hamcrest.Matcher<java.lang.Iterable<javax.validation.ConstraintViolation<T>>> violates(java.util.Collection<org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>> matchers)
public static <T> org.hamcrest.Matcher<java.lang.Iterable<? extends javax.validation.ConstraintViolation<T>>> fails()
public static <T> org.hamcrest.Matcher<java.lang.Iterable<? extends javax.validation.ConstraintViolation<T>>> succeeds()
public static <T> org.hamcrest.Matcher<javax.validation.ConstraintViolation<T>> violation(org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>... matchers)
public static <T> org.hamcrest.Matcher<javax.validation.ConstraintViolation<T>> violation(java.util.Collection<org.hamcrest.Matcher<? super javax.validation.ConstraintViolation<T>>> matchers)
public static <T> org.hamcrest.Matcher<javax.validation.ConstraintViolation<T>> on(java.lang.String pathExpression)
foo.bar would
check that the violation applies to the bar property of the object accessed
by the foo property.
public static <T> org.hamcrest.Matcher<javax.validation.ConstraintViolation<T>> withError(java.lang.String messagePart)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||