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.
|
LogRepository |
getLogRepository() |
groovy.lang.MetaClass |
getMetaClass() |
Object |
getProperty(String property) |
ResponseSpecification |
getResponseSpecification() |
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.
|
Object |
invokeMethod(String method,
Object arguments) |
void |
setLogRepository(LogRepository value) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(String property,
Object value) |
void |
setResponseSpecification(ResponseSpecification value) |
ResponseSpecification |
status()
Logs only the status line (includes the status code)
|
getPrintStream, shouldPrettyPrintpublic groovy.lang.MetaClass getMetaClass()
getMetaClass in interface groovy.lang.GroovyObjectgetMetaClass in class LogSpecificationImplpublic void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass in interface groovy.lang.GroovyObjectsetMetaClass in class LogSpecificationImplpublic Object invokeMethod(String method, Object arguments)
invokeMethod in interface groovy.lang.GroovyObjectinvokeMethod in class LogSpecificationImplpublic Object getProperty(String property)
getProperty in interface groovy.lang.GroovyObjectgetProperty in class LogSpecificationImplpublic void setProperty(String property, Object value)
setProperty in interface groovy.lang.GroovyObjectsetProperty in class LogSpecificationImplpublic ResponseSpecification getResponseSpecification()
public void setResponseSpecification(ResponseSpecification value)
public LogRepository getLogRepository()
public void setLogRepository(LogRepository value)
public ResponseSpecification body()
LogSpecificationbody in interface LogSpecification<ResponseSpecification,Response>public ResponseSpecification body(boolean shouldPrettyPrint)
LogSpecificationbody in interface LogSpecification<ResponseSpecification,Response>shouldPrettyPrint - true if the body should be pretty-printed, false otherwise.public ResponseSpecification all()
LogSpecificationall in interface LogSpecification<ResponseSpecification,Response>public ResponseSpecification all(boolean shouldPrettyPrint)
LogSpecificationall in interface LogSpecification<ResponseSpecification,Response>shouldPrettyPrint - true if the body should be pretty-printed, false otherwise.public ResponseSpecification everything()
LogSpecificationeverything in interface LogSpecification<ResponseSpecification,Response>public ResponseSpecification everything(boolean shouldPrettyPrint)
LogSpecificationeverything in interface LogSpecification<ResponseSpecification,Response>shouldPrettyPrint - true if the body should be pretty-printed, false otherwise.public ResponseSpecification headers()
LogSpecificationheaders in interface LogSpecification<ResponseSpecification,Response>public ResponseSpecification cookies()
LogSpecificationcookies in interface LogSpecification<ResponseSpecification,Response>public ResponseSpecification ifValidationFails()
LogSpecificationifValidationFails in interface LogSpecification<ResponseSpecification,Response>public ResponseSpecification ifValidationFails(LogDetail logDetail)
LogSpecificationifValidationFails in interface LogSpecification<ResponseSpecification,Response>logDetail - The log detailpublic ResponseSpecification ifValidationFails(LogDetail logDetail, boolean shouldPrettyPrint)
LogSpecificationifValidationFails in interface LogSpecification<ResponseSpecification,Response>logDetail - The log detailshouldPrettyPrint - true if the body should be pretty-printed, false otherwise.public ResponseSpecification status()
ResponseLogSpecificationstatus in interface ResponseLogSpecificationpublic ResponseSpecification ifError()
ResponseLogSpecificationifError in interface ResponseLogSpecificationpublic ResponseSpecification ifStatusCodeIsEqualTo(int statusCode)
ResponseLogSpecificationstatusCode.ifStatusCodeIsEqualTo in interface ResponseLogSpecificationstatusCode - The status codepublic ResponseSpecification ifStatusCodeMatches(org.hamcrest.Matcher<Integer> matcher)
ResponseLogSpecificationmatcherifStatusCodeMatches in interface ResponseLogSpecificationmatcher - The hamcrest matcherCopyright © 2010–2014. All rights reserved.