com.github.restdriver.serverdriver.matchers
Class ContainingValue
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>
com.github.restdriver.serverdriver.matchers.ContainingValue
- All Implemented Interfaces:
- org.hamcrest.Matcher<org.codehaus.jackson.JsonNode>, org.hamcrest.SelfDescribing
public final class ContainingValue
- extends org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>
Matcher which checks that a JSON array contains the specified value.
|
Constructor Summary |
ContainingValue(org.hamcrest.Matcher<?> matcher)
Create a new instance which uses the given matcher against all values in a JSON array. |
|
Method Summary |
void |
describeTo(org.hamcrest.Description description)
|
boolean |
matchesSafely(org.codehaus.jackson.JsonNode node)
|
| Methods inherited from class org.hamcrest.TypeSafeMatcher |
describeMismatch, describeMismatchSafely, matches |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
ContainingValue
public ContainingValue(org.hamcrest.Matcher<?> matcher)
- Create a new instance which uses the given matcher against all values in a JSON array.
- Parameters:
matcher - The matcher to be used for evaluation
describeTo
public void describeTo(org.hamcrest.Description description)
matchesSafely
public boolean matchesSafely(org.codehaus.jackson.JsonNode node)
- Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>
Copyright © 2011. All Rights Reserved.