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_HEADERSStandard 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 voidassertBadRequest(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 voidassertCreated(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 voidassertForbidden(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 voidassertForbiddenError(javax.ws.rs.core.Response response)static voidassertJSONEquals(java.lang.Object expected, java.lang.Object actual)static voidassertJSONEquals(java.lang.Object expected, java.lang.Object actual, boolean acceptAdditionalFields)static voidassertJSONEquals(java.lang.Object expected, java.lang.Object actual, java.lang.String wildCard, boolean acceptAdditionalFields)static voidassertOk(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 voidassertResponse(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 voidassertResponse(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 voidassertResponseStatus(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 voidassertResponseStatus(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 voidassertUnauthorized(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)
-
-