java.lang.Object
de.hybris.platform.webservicescommons.testsupport.client.WebservicesAssert

public final class WebservicesAssert extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<String,String>
    Standard headers that need to be present across hybris webservices.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    assertBadRequest(javax.ws.rs.core.Response response, boolean expectEmptyBody)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 6.1 use assertResponse instead
    static void
    assertCreated(javax.ws.rs.core.Response response, boolean expectEmptyBody)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 6.1 use assertResponse instead
    static void
    assertForbidden(javax.ws.rs.core.Response response, boolean expectEmptyBody)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 6.1 use assertResponse instead
    static void
    assertForbiddenError(javax.ws.rs.core.Response response)
     
    static void
    assertJSONEquals(Object expected, Object actual)
     
    static void
    assertJSONEquals(Object expected, Object actual, boolean acceptAdditionalFields)
     
    static void
    assertJSONEquals(Object expected, Object actual, String wildCard, boolean acceptAdditionalFields)
     
    static void
    assertOk(javax.ws.rs.core.Response response, boolean expectEmptyBody)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 6.1 use assertResponse instead
    static void
    assertResponse(javax.ws.rs.core.Response.Status expectedStatus, Optional<Map<String,String>> expectedHeaders, javax.ws.rs.core.Response response)
    Assert response status and verify that no body is there if expectEmptyBody is true.
    static void
    assertResponse(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Response response)
    Assert response status and verify that no body is there if expectEmptyBody is true.
    static void
    assertResponseStatus(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Response response)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 6.1 use assertResponse instead
    static void
    assertResponseStatus(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Response response, boolean expectEmptyBody)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 6.1 use assertResponse instead
    static void
    assertUnauthorized(javax.ws.rs.core.Response response, boolean expectEmptyBody)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 6.1 use assertResponse instead

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SECURED_HEADERS

      public static final Map<String,String> SECURED_HEADERS
      Standard headers that need to be present across hybris webservices.
  • Method Details

    • assertOk

      @Deprecated(since="6.1", forRemoval=true) public static void assertOk(javax.ws.rs.core.Response response, boolean expectEmptyBody)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.1 use assertResponse instead
    • assertCreated

      @Deprecated(since="6.1", forRemoval=true) public static void assertCreated(javax.ws.rs.core.Response response, boolean expectEmptyBody)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.1 use assertResponse instead
    • assertForbidden

      @Deprecated(since="6.1", forRemoval=true) public static void assertForbidden(javax.ws.rs.core.Response response, boolean expectEmptyBody)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.1 use assertResponse instead
    • assertBadRequest

      @Deprecated(since="6.1", forRemoval=true) public static void assertBadRequest(javax.ws.rs.core.Response response, boolean expectEmptyBody)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.1 use assertResponse instead
    • assertUnauthorized

      @Deprecated(since="6.1", forRemoval=true) public static void assertUnauthorized(javax.ws.rs.core.Response response, boolean expectEmptyBody)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.1 use assertResponse instead
    • assertResponseStatus

      @Deprecated(since="6.1", forRemoval=true) public static void assertResponseStatus(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Response response, boolean expectEmptyBody)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.1 use assertResponse instead
    • assertResponseStatus

      @Deprecated(since="6.1", forRemoval=true) public static void assertResponseStatus(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Response response)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 6.1 use assertResponse instead
    • assertResponse

      public static void assertResponse(javax.ws.rs.core.Response.Status expectedStatus, Optional<Map<String,String>> expectedHeaders, javax.ws.rs.core.Response response)
      Assert response status and verify that no body is there if expectEmptyBody is true. This will also check the response against the expected headers passed in parameters.
      Parameters:
      expectedStatus - expected status
      response - response to test
      expectedHeaders - headers that should be present in the response header
    • assertResponse

      public static void assertResponse(javax.ws.rs.core.Response.Status expectedStatus, javax.ws.rs.core.Response response)
      Assert response status and verify that no body is there if expectEmptyBody is true. This will also check the response against basic security headers.
      Parameters:
      expectedStatus - expected status
      response - response to test
    • assertForbiddenError

      public static void assertForbiddenError(javax.ws.rs.core.Response response)
    • assertJSONEquals

      public static void assertJSONEquals(Object expected, Object actual)
    • assertJSONEquals

      public static void assertJSONEquals(Object expected, Object actual, boolean acceptAdditionalFields)
    • assertJSONEquals

      public static void assertJSONEquals(Object expected, Object actual, String wildCard, boolean acceptAdditionalFields)