public class ResponseLogSpecificationImpl extends LogSpecificationImpl implements ResponseLogSpecification
Constructor and Description |
---|
ResponseLogSpecificationImpl() |
Modifier and Type | Method and Description |
---|---|
ResponseSpecification |
all()
Logs everything in the specification, including e.g.
|
ResponseSpecification |
all(boolean shouldPrettyPrint)
Logs everything in the specification, including e.g.
|
ResponseSpecification |
body()
Logs only the content of the body.
|
ResponseSpecification |
body(boolean shouldPrettyPrint)
Logs only the content of the body and pretty-print the body if specified.
|
ResponseSpecification |
cookies()
Logs only the cookies.
|
ResponseSpecification |
everything()
* Logs everything in the specification, including e.g.
|
ResponseSpecification |
everything(boolean shouldPrettyPrint)
* Logs everything in the specification, including e.g.
|
ResponseSpecification |
headers()
Logs only the headers.
|
ResponseSpecification |
ifError()
Logs everything only if an error occurs (status code >= 400).
|
ResponseSpecification |
ifStatusCodeIsEqualTo(int statusCode)
Logs everything only if if the status code is equal to
statusCode . |
ResponseSpecification |
ifStatusCodeMatches(org.hamcrest.Matcher<Integer> matcher)
Logs everything only if if the status code matches the supplied
matcher |
ResponseSpecification |
ifValidationFails()
Logs everything if a test validation fails.
|
ResponseSpecification |
ifValidationFails(LogDetail logDetail)
Logs with the supplied log detail only if the validation fails.
|
ResponseSpecification |
ifValidationFails(LogDetail logDetail,
boolean shouldPrettyPrint)
Logs all parameters only if the validations fail.
|
ResponseSpecification |
status()
Logs only the status line (includes the status code)
|
getMetaClass, getPrintStream, getProperty, invokeMethod, setMetaClass, setProperty, shouldPrettyPrint, shouldUrlEncodeRequestUri
public ResponseSpecification body()
LogSpecification
body
in interface LogSpecification<ResponseSpecification>
public ResponseSpecification body(boolean shouldPrettyPrint)
LogSpecification
body
in interface LogSpecification<ResponseSpecification>
shouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public ResponseSpecification all()
LogSpecification
all
in interface LogSpecification<ResponseSpecification>
public ResponseSpecification all(boolean shouldPrettyPrint)
LogSpecification
all
in interface LogSpecification<ResponseSpecification>
shouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public ResponseSpecification everything()
LogSpecification
everything
in interface LogSpecification<ResponseSpecification>
public ResponseSpecification everything(boolean shouldPrettyPrint)
LogSpecification
everything
in interface LogSpecification<ResponseSpecification>
shouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public ResponseSpecification headers()
LogSpecification
headers
in interface LogSpecification<ResponseSpecification>
public ResponseSpecification cookies()
LogSpecification
cookies
in interface LogSpecification<ResponseSpecification>
public ResponseSpecification ifValidationFails()
LogSpecification
ifValidationFails
in interface LogSpecification<ResponseSpecification>
public ResponseSpecification ifValidationFails(LogDetail logDetail)
LogSpecification
ifValidationFails
in interface LogSpecification<ResponseSpecification>
logDetail
- The log detailpublic ResponseSpecification ifValidationFails(LogDetail logDetail, boolean shouldPrettyPrint)
LogSpecification
ifValidationFails
in interface LogSpecification<ResponseSpecification>
logDetail
- The log detailshouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public ResponseSpecification status()
ResponseLogSpecification
status
in interface ResponseLogSpecification
public ResponseSpecification ifError()
ResponseLogSpecification
ifError
in interface ResponseLogSpecification
public ResponseSpecification ifStatusCodeIsEqualTo(int statusCode)
ResponseLogSpecification
statusCode
.ifStatusCodeIsEqualTo
in interface ResponseLogSpecification
statusCode
- The status codepublic ResponseSpecification ifStatusCodeMatches(org.hamcrest.Matcher<Integer> matcher)
ResponseLogSpecification
matcher
ifStatusCodeMatches
in interface ResponseLogSpecification
matcher
- The hamcrest matcherCopyright © 2010–2022. All rights reserved.