com.github.restdriver.serverdriver.matchers
Class HasJsonArray
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>
com.github.restdriver.serverdriver.matchers.HasJsonArray
- All Implemented Interfaces:
- org.hamcrest.Matcher<org.codehaus.jackson.JsonNode>, org.hamcrest.SelfDescribing
public final class HasJsonArray
- extends org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>
Matcher to verify that a JsonNode has an array with the specified field name.
|
Constructor Summary |
HasJsonArray(String fieldName,
org.hamcrest.Matcher<?> arrayMatcher)
Create an instance of this matcher. |
|
Method Summary |
void |
describeTo(org.hamcrest.Description description)
|
boolean |
matchesSafely(org.codehaus.jackson.JsonNode jsonNode)
|
| Methods inherited from class org.hamcrest.TypeSafeMatcher |
describeMismatch, describeMismatchSafely, matches |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
HasJsonArray
public HasJsonArray(String fieldName,
org.hamcrest.Matcher<?> arrayMatcher)
- Create an instance of this matcher.
- Parameters:
fieldName - The field name to check forarrayMatcher - The matcher to be used to check the array found at the given field name
describeTo
public void describeTo(org.hamcrest.Description description)
matchesSafely
public boolean matchesSafely(org.codehaus.jackson.JsonNode jsonNode)
- Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>
Copyright © 2011. All Rights Reserved.