Package fr.gouv.vitam.common.client
Class VitamRestTestClient.VitamRestTest
- java.lang.Object
-
- fr.gouv.vitam.common.client.VitamRestTestClient.VitamRestTest
-
- Enclosing class:
- VitamRestTestClient
public static class VitamRestTestClient.VitamRestTest extends java.lang.ObjectVItam Rest Test: mimic of Restassured.RequestSpecification
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VitamRestTestClient.VitamRestTestaccept(javax.ws.rs.core.MediaType accept)VitamRestTestClient.VitamRestTestaddHeader(java.lang.String key, java.lang.String value)VitamRestTestClient.VitamRestTestaddPathParameter(java.lang.String name, java.lang.String value)Note: add this method in order in addition to "path". Will add to final path + /name/{value}VitamRestTestClient.VitamRestTestbody(java.lang.Object body, javax.ws.rs.core.MediaType mediaType)intdelete(java.lang.String path)<T> Tdelete(java.lang.String path, java.lang.Class<T> entityTpe)intexecute(VitamRequestBuilder request)<T> Texecute(VitamRequestBuilder request, java.lang.Class<T> entityTpe)intget(java.lang.String path)<T> Tget(java.lang.String path, java.lang.Class<T> entityTpe)inthead(java.lang.String path)intoptions(java.lang.String path)<T> Toptions(java.lang.String path, java.lang.Class<T> entityTpe)intpost(java.lang.String path)<T> Tpost(java.lang.String path, java.lang.Class<T> entityTpe)intput(java.lang.String path)<T> Tput(java.lang.String path, java.lang.Class<T> entityTpe)VitamRestTestClient.VitamRestTeststatus(javax.ws.rs.core.Response.Status status)VitamRestTestClient.VitamRestTeststatusCode(int statusCode)VitamRestTestClient.VitamRestTestthen()java.lang.StringtoString()VitamRestTestClient.VitamRestTestwhen()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
then
public VitamRestTestClient.VitamRestTest then()
- Returns:
- this
-
when
public VitamRestTestClient.VitamRestTest when()
- Returns:
- this
-
status
public VitamRestTestClient.VitamRestTest status(javax.ws.rs.core.Response.Status status)
- Parameters:
status- the expected status- Returns:
- this
-
statusCode
public VitamRestTestClient.VitamRestTest statusCode(int statusCode)
- Parameters:
statusCode- the expected status- Returns:
- this
-
accept
public VitamRestTestClient.VitamRestTest accept(javax.ws.rs.core.MediaType accept)
- Parameters:
accept- the accept MediaType- Returns:
- this
-
body
public VitamRestTestClient.VitamRestTest body(java.lang.Object body, javax.ws.rs.core.MediaType mediaType)
- Parameters:
body-mediaType-- Returns:
- this
-
addHeader
public VitamRestTestClient.VitamRestTest addHeader(java.lang.String key, java.lang.String value)
- Parameters:
key-value-- Returns:
- this
-
addPathParameter
public VitamRestTestClient.VitamRestTest addPathParameter(java.lang.String name, java.lang.String value)
Note: add this method in order in addition to "path". Will add to final path + /name/{value}- Parameters:
name-value-- Returns:
- this
-
execute
public int execute(VitamRequestBuilder request) throws VitamClientInternalException
- Throws:
VitamClientInternalException
-
get
public int get(java.lang.String path) throws VitamClientInternalException- Parameters:
path-- Returns:
- the status code
- Throws:
VitamClientInternalException
-
delete
public int delete(java.lang.String path) throws VitamClientInternalException- Parameters:
path-- Returns:
- the status code
- Throws:
VitamClientInternalException
-
head
public int head(java.lang.String path) throws VitamClientInternalException- Parameters:
path-- Returns:
- the status code
- Throws:
VitamClientInternalException
-
options
public int options(java.lang.String path) throws VitamClientInternalException- Parameters:
path-- Returns:
- the status code
- Throws:
VitamClientInternalException
-
post
public int post(java.lang.String path) throws VitamClientInternalException- Parameters:
path-- Returns:
- the status code
- Throws:
VitamClientInternalException
-
put
public int put(java.lang.String path) throws VitamClientInternalException- Parameters:
path-- Returns:
- the status code
- Throws:
VitamClientInternalException
-
execute
public <T> T execute(VitamRequestBuilder request, java.lang.Class<T> entityTpe) throws VitamClientInternalException
- Throws:
VitamClientInternalException
-
get
public <T> T get(java.lang.String path, java.lang.Class<T> entityTpe) throws VitamClientInternalException- Parameters:
path-entityTpe-- Returns:
- the entity of type
- Throws:
VitamClientInternalException
-
delete
public <T> T delete(java.lang.String path, java.lang.Class<T> entityTpe) throws VitamClientInternalException- Parameters:
path-entityTpe-- Returns:
- the entity of type
- Throws:
VitamClientInternalException
-
options
public <T> T options(java.lang.String path, java.lang.Class<T> entityTpe) throws VitamClientInternalException- Parameters:
path-entityTpe-- Returns:
- the entity of type
- Throws:
VitamClientInternalException
-
post
public <T> T post(java.lang.String path, java.lang.Class<T> entityTpe) throws VitamClientInternalException- Parameters:
path-entityTpe-- Returns:
- the entity of type
- Throws:
VitamClientInternalException
-
put
public <T> T put(java.lang.String path, java.lang.Class<T> entityTpe) throws VitamClientInternalException- Parameters:
path-entityTpe-- Returns:
- the entity of type
- Throws:
VitamClientInternalException
-
-