Class WebservicesAssert
- java.lang.Object
-
- de.hybris.platform.webservicescommons.testsupport.client.WebservicesAssert
-
public final class WebservicesAssert extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<java.lang.String,java.lang.String>
SECURED_HEADERS
Standard headers that need to be present across hybris webservices.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods 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 insteadstatic 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 insteadstatic 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 insteadstatic void
assertForbiddenError(javax.ws.rs.core.Response response)
static void
assertJSONEquals(java.lang.Object expected, java.lang.Object actual)
static void
assertJSONEquals(java.lang.Object expected, java.lang.Object actual, boolean acceptAdditionalFields)
static void
assertJSONEquals(java.lang.Object expected, java.lang.Object actual, java.lang.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 insteadstatic void
assertResponse(javax.ws.rs.core.Response.Status expectedStatus, java.util.Optional<java.util.Map<java.lang.String,java.lang.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 insteadstatic 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 insteadstatic 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
-
-
-
Method Detail
-
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, java.util.Optional<java.util.Map<java.lang.String,java.lang.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 statusresponse
- response to testexpectedHeaders
- 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 statusresponse
- response to test
-
assertForbiddenError
public static void assertForbiddenError(javax.ws.rs.core.Response response)
-
assertJSONEquals
public static void assertJSONEquals(java.lang.Object expected, java.lang.Object actual)
-
assertJSONEquals
public static void assertJSONEquals(java.lang.Object expected, java.lang.Object actual, boolean acceptAdditionalFields)
-
assertJSONEquals
public static void assertJSONEquals(java.lang.Object expected, java.lang.Object actual, java.lang.String wildCard, boolean acceptAdditionalFields)
-
-