public abstract class TestClientResponse
extends java.lang.Object
Client
,
ClientResponse
,
WebResource
Constructor and Description |
---|
TestClientResponse() |
Modifier and Type | Method and Description |
---|---|
void |
assertContainsHeader(com.sun.jersey.api.client.ClientResponse response,
java.lang.String headerName)
Asserts the Client HTTP response contains the named header.
|
void |
assertContainsHeaderWithValue(com.sun.jersey.api.client.ClientResponse response,
java.lang.String headerName,
java.lang.String expectedValue)
Asserts the value of a Header against an expected value.
|
void |
assertStatusCode(com.sun.jersey.api.client.ClientResponse response,
int expectedStatusCode)
Asserts the Client's HTTP response status against an expected status.
|
com.sun.jersey.api.client.ClientResponse |
get(java.lang.String url)
Get the client (in-bound) HTTP response.
|
java.lang.String |
getCorrelationId(com.sun.jersey.api.client.ClientResponse response) |
java.lang.String |
getHeaderValue(com.sun.jersey.api.client.ClientResponse response,
java.lang.String headerName)
Get a HTTP header value in the response
|
com.sun.jersey.api.client.ClientResponse |
post(java.lang.String url,
java.lang.String headerName,
java.lang.String headerValue,
java.io.File body)
Invoke the POST method with a request entity that
returns a HTTP response.
|
public com.sun.jersey.api.client.ClientResponse get(java.lang.String url)
url
- URL of a web resourceClientResponse
public com.sun.jersey.api.client.ClientResponse post(java.lang.String url, java.lang.String headerName, java.lang.String headerValue, java.io.File body)
url
- URL of a web resourceheaderName
- Header nameheaderValue
- Header valuebody
- Body ContentClientResponse
public java.lang.String getHeaderValue(com.sun.jersey.api.client.ClientResponse response, java.lang.String headerName)
response
- Client HTTP responseheaderName
- Name of headerpublic java.lang.String getCorrelationId(com.sun.jersey.api.client.ClientResponse response)
public void assertContainsHeader(com.sun.jersey.api.client.ClientResponse response, java.lang.String headerName)
response
- Client HTTP responseheaderName
- Name of headerpublic void assertContainsHeaderWithValue(com.sun.jersey.api.client.ClientResponse response, java.lang.String headerName, java.lang.String expectedValue)
response
- Client HTTP responseheaderName
- Name of headerexpectedValue
- Expected header valuepublic void assertStatusCode(com.sun.jersey.api.client.ClientResponse response, int expectedStatusCode)
response
- Client HTTP responseexpectedStatusCode
- Expected status code
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel