public static class VitamRestTestClient.VitamRestTest extends Object
Modifier and Type | Method and Description |
---|---|
VitamRestTestClient.VitamRestTest |
accept(javax.ws.rs.core.MediaType accept) |
VitamRestTestClient.VitamRestTest |
addHeader(String key,
String value) |
VitamRestTestClient.VitamRestTest |
addPathParameter(String name,
String value)
Note: add this method in order in addition to "path".
Will add to final path + /name/{value}
|
VitamRestTestClient.VitamRestTest |
body(Object body,
javax.ws.rs.core.MediaType mediaType) |
int |
delete(String path) |
<T> T |
delete(String path,
Class<T> entityTpe) |
int |
execute(String httpMethod,
String path)
The response content is ignored, only the status code is returned.
|
<T> T |
execute(String httpMethod,
String path,
Class<T> entityTpe)
The response content is returned according to type, except if status code is different than the one expected.
|
int |
get(String path) |
<T> T |
get(String path,
Class<T> entityTpe) |
int |
head(String path) |
int |
options(String path) |
<T> T |
options(String path,
Class<T> entityTpe) |
int |
post(String path) |
<T> T |
post(String path,
Class<T> entityTpe) |
int |
put(String path) |
<T> T |
put(String path,
Class<T> entityTpe) |
VitamRestTestClient.VitamRestTest |
status(javax.ws.rs.core.Response.Status status) |
VitamRestTestClient.VitamRestTest |
statusCode(int statusCode) |
VitamRestTestClient.VitamRestTest |
then() |
String |
toString() |
VitamRestTestClient.VitamRestTest |
when() |
public VitamRestTestClient.VitamRestTest then()
public VitamRestTestClient.VitamRestTest when()
public VitamRestTestClient.VitamRestTest status(javax.ws.rs.core.Response.Status status)
status
- the expected statuspublic VitamRestTestClient.VitamRestTest statusCode(int statusCode)
statusCode
- the expected statuspublic VitamRestTestClient.VitamRestTest accept(javax.ws.rs.core.MediaType accept)
accept
- the accept MediaTypepublic VitamRestTestClient.VitamRestTest body(Object body, javax.ws.rs.core.MediaType mediaType)
body
- mediaType
- public VitamRestTestClient.VitamRestTest addHeader(String key, String value)
key
- value
- public VitamRestTestClient.VitamRestTest addPathParameter(String name, String value)
name
- value
- public int execute(String httpMethod, String path) throws VitamClientInternalException
httpMethod
- path
- VitamClientInternalException
- if the status code is not the one expected (if specified)public int get(String path) throws VitamClientInternalException
path
- VitamClientInternalException
public int delete(String path) throws VitamClientInternalException
path
- VitamClientInternalException
public int head(String path) throws VitamClientInternalException
path
- VitamClientInternalException
public int options(String path) throws VitamClientInternalException
path
- VitamClientInternalException
public int post(String path) throws VitamClientInternalException
path
- VitamClientInternalException
public int put(String path) throws VitamClientInternalException
path
- VitamClientInternalException
public <T> T execute(String httpMethod, String path, Class<T> entityTpe) throws VitamClientInternalException
T
- the type of the entityTypehttpMethod
- path
- entityTpe
- VitamClientInternalException
- if the status code is not the one expected (if specified)public <T> T get(String path, Class<T> entityTpe) throws VitamClientInternalException
path
- entityTpe
- VitamClientInternalException
public <T> T delete(String path, Class<T> entityTpe) throws VitamClientInternalException
path
- entityTpe
- VitamClientInternalException
public <T> T options(String path, Class<T> entityTpe) throws VitamClientInternalException
path
- entityTpe
- VitamClientInternalException
public <T> T post(String path, Class<T> entityTpe) throws VitamClientInternalException
path
- entityTpe
- VitamClientInternalException
public <T> T put(String path, Class<T> entityTpe) throws VitamClientInternalException
path
- entityTpe
- VitamClientInternalException
Copyright © 2018 Vitam. All rights reserved.