getResponseData

This method will get the response data from the response body.

Parameters

expression

This parameter expects a valid JsonPath expression.

Return Type: String

Returns the response data as string.

getResponseData

This method will get the response data from the response body.

Parameters

expression

This parameter expects a valid JsonPath expression.

type

This parameter expects a class type.

Return Type: <T>

Returns the response data as Java object.

verifyBooleanField

This method will verify the boolean field in the response body.

Parameters

expression

This parameter expects a valid JsonPath expression.

Return Type: BooleanSubject

Returns the BooleanSubject object.

verifyIntField

This method will verify the boolean field in the response body.

Parameters

expression

This parameter expects a valid JsonPath expression.

Return Type: IntegerSubject

Returns the IntegerSubject object.

verifyStatusCode

This method will verify the status code of the response.

Return Type: IntegerSubject

Returns the IntegerSubject object.

verifyStatusMessage

This method will verify the status message of the response.

Return Type: StringSubject

Returns the StringSubject object.

verifyTextField

This method will verify the text field in the response body.

Parameters

expression

This parameter expects a valid JsonPath expression.

Return Type: StringSubject

Returns the StringSubject object.

verifyHeader

This method will verify the header keys in the response body.

Parameters

key

This parameter expects a valid key value.

Return Type: StringSubject

Returns the StringSubject object.

verifySchema

This method will verify the api response body json schema.

Parameters

schemaName

This parameter expects a valid schemaName value. The schemaName is a json file containing the expected json schema version stored at location src/test/resources/schema/<schameName>.json.