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 |
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) |
void |
finished() |
CloseableClientResponse |
get(String path) |
CloseableClientResponse |
post(String path,
Object data) |
CloseableClientResponse |
put(String path,
Object data) |
void |
starting() |
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
public void starting()
public void finished()
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 © 2019 Nuxeo. All rights reserved.