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.Object
VItam Rest Test: mimic of Restassured.RequestSpecification
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VitamRestTestClient.VitamRestTest
accept(javax.ws.rs.core.MediaType accept)
VitamRestTestClient.VitamRestTest
addHeader(java.lang.String key, java.lang.String value)
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}VitamRestTestClient.VitamRestTest
body(java.lang.Object body, javax.ws.rs.core.MediaType mediaType)
int
delete(java.lang.String path)
<T> T
delete(java.lang.String path, java.lang.Class<T> entityTpe)
int
execute(VitamRequestBuilder request)
<T> T
execute(VitamRequestBuilder request, java.lang.Class<T> entityTpe)
int
get(java.lang.String path)
<T> T
get(java.lang.String path, java.lang.Class<T> entityTpe)
int
head(java.lang.String path)
int
options(java.lang.String path)
<T> T
options(java.lang.String path, java.lang.Class<T> entityTpe)
int
post(java.lang.String path)
<T> T
post(java.lang.String path, java.lang.Class<T> entityTpe)
int
put(java.lang.String path)
<T> T
put(java.lang.String path, java.lang.Class<T> entityTpe)
VitamRestTestClient.VitamRestTest
status(javax.ws.rs.core.Response.Status status)
VitamRestTestClient.VitamRestTest
statusCode(int statusCode)
VitamRestTestClient.VitamRestTest
then()
java.lang.String
toString()
VitamRestTestClient.VitamRestTest
when()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-