Package | Description |
---|---|
io.restassured.builder |
Modifier and Type | Method and Description |
---|---|
ResponseSpecBuilder |
ResponseSpecBuilder.addResponseSpecification(ResponseSpecification specification)
Merge this builder with settings from another specification.
|
ResponseSpecBuilder |
ResponseSpecBuilder.appendRootPath(String pathToAppend)
Append the given path to the root path of the response body so that you don't need to write the entire path for each expectation.
|
ResponseSpecBuilder |
ResponseSpecBuilder.appendRootPath(String pathToAppend,
List<Argument> arguments)
Append the given path to the root path with arguments supplied of the response body so that you don't need to write the entire path for each expectation.
|
ResponseSpecBuilder |
ResponseSpecBuilder.detachRootPath(String pathToDetach)
Detach the given path from the root path.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectBody(org.hamcrest.Matcher<?> matcher)
Expect that the response body conforms to one or more Hamcrest matchers.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectBody(String path,
List<Argument> arguments,
org.hamcrest.Matcher<?> matcher)
Same as
expectBody(String, org.hamcrest.Matcher) expect that you can pass arguments to the path. |
ResponseSpecBuilder |
ResponseSpecBuilder.expectBody(String path,
org.hamcrest.Matcher<?> matcher)
Expect that the JSON or XML response content conforms to one or more Hamcrest matchers.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectContentType(ContentType contentType)
Set the response content type to be
contentType . |
ResponseSpecBuilder |
ResponseSpecBuilder.expectContentType(String contentType)
Set the response content type to be
contentType . |
ResponseSpecBuilder |
ResponseSpecBuilder.expectCookie(String cookieName)
Expect that a cookie exist in the response, regardless of value (it may have no value at all).
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectCookie(String cookieName,
DetailedCookieMatcher detailedCookieMatcher)
Expect that a detailed response cookie matches the supplied cookie name and hamcrest matcher (see
DetailedCookieMatcher . |
ResponseSpecBuilder |
ResponseSpecBuilder.expectCookie(String cookieName,
org.hamcrest.Matcher<String> expectedValueMatcher)
Expect that a response cookie matches the supplied cookie name and hamcrest matcher.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectCookie(String cookieName,
String expectedValue)
Expect that a response cookie matches the supplied name and value.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectCookies(Map<String,Object> expectedCookies)
Expect that response cookies matches those specified in a Map.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectHeader(String headerName,
org.hamcrest.Matcher<String> expectedValueMatcher)
Expect that a response header matches the supplied header name and hamcrest matcher.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectHeader(String headerName,
String expectedValue)
Expect that a response header matches the supplied name and value.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectHeaders(Map<String,Object> expectedHeaders)
Expect that response headers matches those specified in a Map.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectResponseTime(org.hamcrest.Matcher<Long> matcher)
Validate that the response time (in milliseconds) matches the supplied
matcher . |
ResponseSpecBuilder |
ResponseSpecBuilder.expectResponseTime(org.hamcrest.Matcher<Long> matcher,
TimeUnit timeUnit)
Validate that the response time matches the supplied
matcher and time unit. |
ResponseSpecBuilder |
ResponseSpecBuilder.expectStatusCode(int expectedStatusCode)
Expect that the response status code matches an integer.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectStatusCode(org.hamcrest.Matcher<Integer> expectedStatusCode)
Expect that the response status code matches the given Hamcrest matcher.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectStatusLine(org.hamcrest.Matcher<String> expectedStatusLine)
Expect that the response status line matches the given Hamcrest matcher.
|
ResponseSpecBuilder |
ResponseSpecBuilder.expectStatusLine(String expectedStatusLine)
Expect that the response status line matches the given String.
|
ResponseSpecBuilder |
ResponseSpecBuilder.log(LogDetail logDetail)
Enabled logging with the specified log detail.
|
ResponseSpecBuilder |
ResponseSpecBuilder.noRootPath()
Reset the root path of the response body so that you don't need to write the entire path for each expectation.
|
ResponseSpecBuilder |
ResponseSpecBuilder.registerParser(String contentType,
Parser parser)
Register a content-type to be parsed using a predefined parser.
|
ResponseSpecBuilder |
ResponseSpecBuilder.rootPath(String rootPath)
Set the root path of the response body so that you don't need to write the entire path for each expectation.
|
ResponseSpecBuilder |
ResponseSpecBuilder.rootPath(String rootPath,
List<Argument> arguments)
Set the root path of the response body so that you don't need to write the entire path for each expectation.
|
ResponseSpecBuilder |
ResponseSpecBuilder.setDefaultParser(Parser parser)
Register a default predefined parser that will be used if no other parser (registered or pre-defined) matches the response
content-type.
|
Copyright © 2010–2019. All rights reserved.