Package org.nuxeo.jaxrs.test
Class HttpClientTestRule
- java.lang.Object
-
- org.nuxeo.jaxrs.test.HttpClientTestRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class HttpClientTestRule extends Object implements org.junit.rules.TestRule
- Since:
- 10.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HttpClientTestRule.Builder
The http client test rule builder.
-
Field Summary
Fields Modifier and Type Field Description static String
ADMINISTRATOR
protected com.sun.jersey.api.client.Client
client
protected com.sun.jersey.api.client.WebResource
service
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Field Detail
-
ADMINISTRATOR
public static final String ADMINISTRATOR
- See Also:
- Constant Field Values
-
client
protected com.sun.jersey.api.client.Client client
-
service
protected com.sun.jersey.api.client.WebResource service
-
-
Method Detail
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
- Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
starting
public void starting()
-
finished
public void finished()
-
get
public CloseableClientResponse get(String path)
-
post
public CloseableClientResponse post(String path, Object data)
-
put
public CloseableClientResponse put(String path, Object data)
-
delete
public CloseableClientResponse delete(String path)
-
execute
protected CloseableClientResponse execute(String path, Function<com.sun.jersey.api.client.WebResource.Builder,com.sun.jersey.api.client.ClientResponse> invoker)
-
-