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 content type of the response body.
|
Verifier |
contentTypeIs(ContentType contentType)
Verify content type of the response body.
|
Verifier |
cookie(java.lang.String name,
org.hamcrest.Matcher<?> matcher)
Verify response cookie.
|
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)
Deprecated.
|
Path |
path(java.lang.String key,
org.hamcrest.Matcher<?> matcher,
java.lang.Object additionalKeyMatcherPairs)
Verify path of the response body.
|
MultiPath |
path(java.lang.String key,
com.github.aivancioglo.resttest.verifiers.Path paths)
Set path for path verifying.
|
Verifier |
schema(java.lang.String schema)
Verify response body using schema validation.
|
Verifier |
statusCode(int statusCode)
Verify status code of the response.
|
Verifier |
statusCode(StatusCode statusCode)
Verify status code of the response.
|
Verifier |
statusCode(org.hamcrest.Matcher<? super java.lang.Integer> matcher)
Verify status code of the response.
|
Verifier |
statusCode(kotlin.Pair<? extends com.github.aivancioglo.resttest.http.StatusCode,? extends com.github.aivancioglo.resttest.http.StatusCode> statusCodes)
Verify status code of the response.
|
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 status code of the response.
statusCode - Status code of your response.public Verifier statusCode(StatusCode statusCode)
Verify status code of the response.
statusCode - Status code of your response.public Verifier statusCode(org.hamcrest.Matcher<? super java.lang.Integer> matcher)
Verify status code of the response.
matcher - Matcher for status code.public Verifier statusCode(kotlin.Pair<? extends com.github.aivancioglo.resttest.http.StatusCode,? extends com.github.aivancioglo.resttest.http.StatusCode> statusCodes)
Verify status code of the response.
statusCodes - of your response.public Verifier jsonSchema(java.lang.String jsonSchema)
Verify response body using JSON schema validation.
jsonSchema - Json schema of expected response body.public Verifier schema(java.lang.String schema)
Verify response body using schema validation.
schema - Schema of expected response body.public Path path(java.lang.String key, org.hamcrest.Matcher<?> matcher, java.lang.Object additionalKeyMatcherPairs)
Verify path of the response body.
key - Key of your response body.matcher - Matcher for verification.additionalKeyMatcherPairs - Additional key and matcher pairs for verification.public MultiPath path(java.lang.String key, com.github.aivancioglo.resttest.verifiers.Path paths)
Set path for path verifying.
key - of your response body.public Verifier body(org.hamcrest.Matcher<?> matcher, org.hamcrest.Matcher additionalMatchers)
Verify response body.
matcher - Matcher for verification.additionalMatchers - Additional matchers for verification.public Verifier contentTypeIs(java.lang.String contentType)
Verify content type of the response body.
contentType - Content type of response body.public Verifier contentTypeIs(ContentType contentType)
Verify content type of the response body.
contentType - Content type of response body.public Verifier cookie(java.lang.String name, org.hamcrest.Matcher<?> matcher)
Verify response cookie.
name - Name of cookie.matcher - Matcher of response cookie.public Verifier header(java.lang.String name, org.hamcrest.Matcher<?> matcher)
Verify response header.
name - Name of header.matcher - Matcher of response header.public Verifier headers(java.util.Map<java.lang.String,?> expectedHeaders)
Verify response headers.
expectedHeaders - Expected headers of response.public Verifier headers(java.lang.String firstExpectedHeaderName, java.lang.Object firstExpectedHeaderValue, java.lang.Object expectedHeaders)
Verify response headers.
firstExpectedHeaderName - First header name expected of response.firstExpectedHeaderValue - First header value expected of response.expectedHeaders - List of expected headers of response (expected "header name" - "header value" pairs).public Verifier time(org.hamcrest.Matcher<java.lang.Long> matcher)
Verify the response time (in milliseconds).
matcher - Response time of the request.public Verifier time(org.hamcrest.Matcher<java.lang.Long> matcher, java.util.concurrent.TimeUnit timeUnit)
Verify the response time (in milliseconds).
matcher - Response time of the request.timeUnit - Time unit of response.