|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.testinfected.hamcrest.spring.SpringMatchers
public class SpringMatchers
| Method Summary | ||
|---|---|---|
static org.hamcrest.Matcher<org.springframework.ui.Model> |
containsAttribute(java.lang.String key)
Checks that a web Model contains some
non-null value stored under a specific key. |
|
static
|
hasAttribute(java.lang.String key,
T value)
Checks that a web Model contains a given
key-value pair. |
|
static
|
hasAttributeValue(java.lang.String key,
org.hamcrest.Matcher<? super T> valueMatcher)
Checks that a web Model contains a given
key-value pair. |
|
static org.hamcrest.Matcher<java.lang.String> |
isRedirectedTo(java.lang.String location)
Checks that a view indicates an HTTP redirection to a given location. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> org.hamcrest.Matcher<org.springframework.ui.Model> hasAttribute(java.lang.String key,
T value)
Model contains a given
key-value pair.
key - the key under which the value to check is stored in the model.value - the expected value stored in the model.
public static <T> org.hamcrest.Matcher<org.springframework.ui.Model> hasAttributeValue(java.lang.String key,
org.hamcrest.Matcher<? super T> valueMatcher)
Model contains a given
key-value pair. The key value must match the given matcher.
key - the key under which the value to check is stored in the model.valueMatcher - matcher used to check the value stored in the model.public static org.hamcrest.Matcher<org.springframework.ui.Model> containsAttribute(java.lang.String key)
Model contains some
non-null value stored under a specific key.
key - the key under which a non-null value should be stored in the model.public static org.hamcrest.Matcher<java.lang.String> isRedirectedTo(java.lang.String location)
location - expected location of the redirection.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||