com.github.restdriver.serverdriver.matchers
Class HasStatusCode
java.lang.Object
org.hamcrest.BaseMatcher<T>
org.hamcrest.TypeSafeMatcher<Response>
com.github.restdriver.serverdriver.matchers.HasStatusCode
- All Implemented Interfaces:
- org.hamcrest.Matcher<Response>, org.hamcrest.SelfDescribing
public final class HasStatusCode
- extends org.hamcrest.TypeSafeMatcher<Response>
Matcher to check whether an HTTP response has a particular status code.
|
Constructor Summary |
HasStatusCode(org.hamcrest.Matcher<Integer> statusCodeMatcher)
Creates an instance of this matcher. |
| Methods inherited from class org.hamcrest.TypeSafeMatcher |
describeMismatch, matches |
| Methods inherited from class org.hamcrest.BaseMatcher |
_dont_implement_Matcher___instead_extend_BaseMatcher_, toString |
HasStatusCode
public HasStatusCode(org.hamcrest.Matcher<Integer> statusCodeMatcher)
- Creates an instance of this matcher.
- Parameters:
statusCodeMatcher - The matcher to be used to evaluate the status code of a response
matchesSafely
protected boolean matchesSafely(Response item)
- Specified by:
matchesSafely in class org.hamcrest.TypeSafeMatcher<Response>
describeTo
public void describeTo(org.hamcrest.Description description)
describeMismatchSafely
protected void describeMismatchSafely(Response item,
org.hamcrest.Description mismatchDescription)
- Overrides:
describeMismatchSafely in class org.hamcrest.TypeSafeMatcher<Response>
Copyright © 2011. All Rights Reserved.