public static class Verifiers.Companion
| Modifier and Type | Method and Description |
|---|---|
Verifier |
body(org.hamcrest.Matcher<?> matcher,
org.hamcrest.Matcher additionalMatchers)
Verify response body.
|
Verifier |
contentTypeIs(java.lang.String contentType)
Verify response body content type.
|
Verifier |
contentTypeIs(ContentType contentType)
Verify response body content type.
|
Verifier |
header(java.lang.String name,
org.hamcrest.Matcher<?> matcher)
Verify response header.
|
Verifier |
headers(java.util.Map<java.lang.String,?> expectedHeaders)
Verify response headers.
|
Verifier |
headers(java.lang.String firstExpectedHeaderName,
java.lang.Object firstExpectedHeaderValue,
java.lang.Object expectedHeaders)
Verify response headers.
|
Verifier |
jsonSchema(java.lang.String jsonSchema)
Verify response body using JSON schema validation.
|
Verifier |
path(java.lang.String key,
org.hamcrest.Matcher<?> matcher,
java.lang.Object additionalKeyMatcherPairs)
Verify response body path.
|
Verifier |
statusCode(int statusCode)
Verify response status code.
|
Verifier |
statusCode(StatusCode statusCode)
Verify response status code.
|
Verifier |
time(org.hamcrest.Matcher<java.lang.Long> matcher)
Verify the response time (in milliseconds).
|
Verifier |
time(org.hamcrest.Matcher<java.lang.Long> matcher,
java.util.concurrent.TimeUnit timeUnit)
Verify the response time (in milliseconds).
|
public Verifier statusCode(int statusCode)
Verify response status code.
statusCode - of your responseSpecification.public Verifier statusCode(StatusCode statusCode)
Verify response status code.
statusCode - of your responseSpecification.public Verifier jsonSchema(java.lang.String jsonSchema)
Verify response body using JSON schema validation.
jsonSchema - of expected responseSpecification body.public Verifier path(java.lang.String key, org.hamcrest.Matcher<?> matcher, java.lang.Object additionalKeyMatcherPairs)
Verify response body path.
key - of your responseSpecification body.matcher - for verifying.additionalKeyMatcherPairs - for verifying.public Verifier body(org.hamcrest.Matcher<?> matcher, org.hamcrest.Matcher additionalMatchers)
Verify response body.
matcher - for verifying.additionalMatchers - for verifying.public Verifier contentTypeIs(java.lang.String contentType)
Verify response body content type.
contentType - of response body content type.public Verifier contentTypeIs(ContentType contentType)
Verify response body content type.
contentType - of response body content type.public Verifier header(java.lang.String name, org.hamcrest.Matcher<?> matcher)
Verify response header.
name - of header.matcher - of responseSpecification header.public Verifier headers(java.util.Map<java.lang.String,?> expectedHeaders)
Verify response headers.
expectedHeaders - of responseSpecification.public Verifier headers(java.lang.String firstExpectedHeaderName, java.lang.Object firstExpectedHeaderValue, java.lang.Object expectedHeaders)
Verify response headers.
firstExpectedHeaderName - of responseSpecification.firstExpectedHeaderValue - of responseSpecification.expectedHeaders - list of responseSpecification (expected "header name" - "header value" pairs).public Verifier time(org.hamcrest.Matcher<java.lang.Long> matcher)
Verify the response time (in milliseconds).
matcher - request response time.public Verifier time(org.hamcrest.Matcher<java.lang.Long> matcher, java.util.concurrent.TimeUnit timeUnit)
Verify the response time (in milliseconds).
matcher - request response time.timeUnit - of response.