com.github.restdriver.serverdriver.matchers
Class HasResponseBody

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

public final class HasResponseBody
extends org.hamcrest.TypeSafeMatcher<Response>

Matcher to check that an HttpResponse has the specified body.


Constructor Summary
HasResponseBody(org.hamcrest.Matcher<String> bodyMatcher)
          Creates a new instance of this matcher.
 
Method Summary
 void describeTo(org.hamcrest.Description description)
           
 boolean matchesSafely(Response actualResponse)
           
 
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

HasResponseBody

public HasResponseBody(org.hamcrest.Matcher<String> bodyMatcher)
Creates a new instance of this matcher.

Parameters:
bodyMatcher - The matcher to be used to evaluate the body of the response
Method Detail

describeTo

public void describeTo(org.hamcrest.Description description)

matchesSafely

public boolean matchesSafely(Response actualResponse)
Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<Response>


Copyright © 2011. All Rights Reserved.