com.github.restdriver.serverdriver.matchers
Class HasJsonValue

java.lang.Object
  extended by org.hamcrest.BaseMatcher<T>
      extended by org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>
          extended by com.github.restdriver.serverdriver.matchers.HasJsonValue
All Implemented Interfaces:
org.hamcrest.Matcher<org.codehaus.jackson.JsonNode>, org.hamcrest.SelfDescribing

public final class HasJsonValue
extends org.hamcrest.TypeSafeMatcher<org.codehaus.jackson.JsonNode>

Matcher to check that a given key has a particular value in a JsonNode.


Constructor Summary
HasJsonValue(String fieldName, org.hamcrest.Matcher<?> valueMatcher)
          Creates 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HasJsonValue

public HasJsonValue(String fieldName,
                    org.hamcrest.Matcher<?> valueMatcher)
Creates an instance of this matcher.

Parameters:
fieldName - The field name against which the matcher will be evaluated
valueMatcher - The matcher to be used to evaluate the value found at the given field name
Method Detail

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.