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 Object
VItam Rest Test: mimic of Restassured.RequestSpecification

- ## Method Summary

  Modifier and Type
  Method
  Description
  `VitamRestTestClient.VitamRestTest`
  `accept(jakarta.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, jakarta.ws.rs.core.MediaType mediaType)`
  `int`
  `delete(String path)`
  `<T> T`
  `delete(String path, Class<T> entityTpe)`
  `int`
  `execute(VitamRequestBuilder request)`
  `<T> T`
  `execute(VitamRequestBuilder request, Class<T> entityTpe)`
  `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(jakarta.ws.rs.core.Response.Status status)`
  `VitamRestTestClient.VitamRestTest`
  `statusCode(int statusCode)`
  `VitamRestTestClient.VitamRestTest`
  `then()`
  `String`
  `toString()`
  `VitamRestTestClient.VitamRestTest`
  `when()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### then

    public VitamRestTestClient.VitamRestTest then()
    Returns:
      this

  - ### when

    public VitamRestTestClient.VitamRestTest when()
    Returns:
      this

  - ### status

    public VitamRestTestClient.VitamRestTest status(jakarta.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(jakarta.ws.rs.core.MediaType accept)
    Parameters:
      `accept` - the accept MediaType
    Returns:
      this

  - ### body

    public VitamRestTestClient.VitamRestTest body(Object body, jakarta.ws.rs.core.MediaType mediaType)
    Parameters:
      `body` -
      `mediaType` -
    Returns:
      this

  - ### addHeader

    public VitamRestTestClient.VitamRestTest addHeader(String key, String value)
    Parameters:
      `key` -
      `value` -
    Returns:
      this

  - ### addPathParameter

    public VitamRestTestClient.VitamRestTest addPathParameter(String name, 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(String path) throws VitamClientInternalException
    Parameters:
      `path` -
    Returns:
      the status code
    Throws:
      `VitamClientInternalException`

  - ### delete

    public int delete(String path) throws VitamClientInternalException
    Parameters:
      `path` -
    Returns:
      the status code
    Throws:
      `VitamClientInternalException`

  - ### head

    public int head(String path) throws VitamClientInternalException
    Parameters:
      `path` -
    Returns:
      the status code
    Throws:
      `VitamClientInternalException`

  - ### options

    public int options(String path) throws VitamClientInternalException
    Parameters:
      `path` -
    Returns:
      the status code
    Throws:
      `VitamClientInternalException`

  - ### post

    public int post(String path) throws VitamClientInternalException
    Parameters:
      `path` -
    Returns:
      the status code
    Throws:
      `VitamClientInternalException`

  - ### put

    public int put(String path) throws VitamClientInternalException
    Parameters:
      `path` -
    Returns:
      the status code
    Throws:
      `VitamClientInternalException`

  - ### execute

    public <T> T execute(VitamRequestBuilder request, Class<T> entityTpe) throws VitamClientInternalException
    Throws:
      `VitamClientInternalException`

  - ### get

    public <T> T get(String path, Class<T> entityTpe) throws VitamClientInternalException
    Parameters:
      `path` -
      `entityTpe` -
    Returns:
      the entity of type
    Throws:
      `VitamClientInternalException`

  - ### delete

    public <T> T delete(String path, Class<T> entityTpe) throws VitamClientInternalException
    Parameters:
      `path` -
      `entityTpe` -
    Returns:
      the entity of type
    Throws:
      `VitamClientInternalException`

  - ### options

    public <T> T options(String path, Class<T> entityTpe) throws VitamClientInternalException
    Parameters:
      `path` -
      `entityTpe` -
    Returns:
      the entity of type
    Throws:
      `VitamClientInternalException`

  - ### post

    public <T> T post(String path, Class<T> entityTpe) throws VitamClientInternalException
    Parameters:
      `path` -
      `entityTpe` -
    Returns:
      the entity of type
    Throws:
      `VitamClientInternalException`

  - ### put

    public <T> T put(String path, Class<T> entityTpe) throws VitamClientInternalException
    Parameters:
      `path` -
      `entityTpe` -
    Returns:
      the entity of type
    Throws:
      `VitamClientInternalException`