public class HttpClientTestRule extends Object implements org.junit.rules.TestRule
Modifier and Type | Class and Description |
---|---|
static class |
HttpClientTestRule.Builder
The http client test rule builder.
|
Modifier and Type | Field and Description |
---|---|
static String |
ADMINISTRATOR |
static String |
APPLICATION_JSON_NXENTITY |
protected com.sun.jersey.api.client.Client |
client |
protected com.sun.jersey.api.client.WebResource |
service |
Modifier and Type | Method and Description |
---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
CloseableClientResponse |
delete(String path) |
protected CloseableClientResponse |
execute(String path,
Function<com.sun.jersey.api.client.WebResource.Builder,com.sun.jersey.api.client.ClientResponse> invoker) |
protected void |
finished(org.junit.runner.Description description) |
CloseableClientResponse |
get(String path) |
CloseableClientResponse |
post(String path,
Object data) |
CloseableClientResponse |
put(String path,
Object data) |
protected void |
starting(org.junit.runner.Description description) |
public static final String APPLICATION_JSON_NXENTITY
public static final String ADMINISTRATOR
protected com.sun.jersey.api.client.Client client
protected com.sun.jersey.api.client.WebResource service
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
protected void starting(org.junit.runner.Description description)
protected void finished(org.junit.runner.Description description)
public CloseableClientResponse get(String path)
public CloseableClientResponse post(String path, Object data)
public CloseableClientResponse put(String path, Object data)
public CloseableClientResponse delete(String path)
protected CloseableClientResponse execute(String path, Function<com.sun.jersey.api.client.WebResource.Builder,com.sun.jersey.api.client.ClientResponse> invoker)
Copyright © 2018 Nuxeo. All rights reserved.