public class HasHttpStatus
extends org.hamcrest.TypeSafeMatcher<javax.ws.rs.core.Response>
Response with an
expected value. The expected value can be provided as an integer or as a
Response.StatusType.| Constructor and Description |
|---|
HasHttpStatus(int statusCode)
Constructs a new instance of
HasHttpStatus. |
HasHttpStatus(javax.ws.rs.core.Response.StatusType status)
Constructs a new instance of
HasHttpStatus. |
| Modifier and Type | Method and Description |
|---|---|
void |
describeTo(org.hamcrest.Description description) |
static HasHttpStatus |
hasHttpStatus(int statusCode)
Factory method that creates a
HasHttpStatus for the provided
status code. |
static HasHttpStatus |
hasHttpStatus(javax.ws.rs.core.Response.StatusType status)
Factory method that creates a
HasHttpStatus for the provided
status. |
protected boolean |
matchesSafely(javax.ws.rs.core.Response item) |
describeMismatch, describeMismatchSafely, matchespublic HasHttpStatus(javax.ws.rs.core.Response.StatusType status)
HasHttpStatus.status - the expected status.public HasHttpStatus(int statusCode)
HasHttpStatus.statusCode - the expected status code.public void describeTo(org.hamcrest.Description description)
protected boolean matchesSafely(javax.ws.rs.core.Response item)
matchesSafely in class org.hamcrest.TypeSafeMatcher<javax.ws.rs.core.Response>public static HasHttpStatus hasHttpStatus(int statusCode)
HasHttpStatus for the provided
status code.statusCode - the expected status code.HasHttpStatus for the provided status code.public static HasHttpStatus hasHttpStatus(javax.ws.rs.core.Response.StatusType status)
HasHttpStatus for the provided
status.status - the expected status.HasHttpStatus for the provided status.Copyright © 2016. All rights reserved.