public class RequestLogSpecificationImpl extends LogSpecificationImpl implements RequestLogSpecification, groovy.lang.GroovyObject
Constructor and Description |
---|
RequestLogSpecificationImpl() |
Modifier and Type | Method and Description |
---|---|
RequestSpecification |
all()
Logs everything in the specification, including e.g.
|
RequestSpecification |
all(boolean shouldPrettyPrint)
Logs everything in the specification, including e.g.
|
RequestSpecification |
body()
Logs only the content of the body.
|
RequestSpecification |
body(boolean shouldPrettyPrint)
Logs only the content of the body and pretty-print the body if specified.
|
RequestSpecification |
cookies()
Logs only the cookies.
|
RequestSpecification |
everything()
* Logs everything in the specification, including e.g.
|
RequestSpecification |
everything(boolean shouldPrettyPrint)
* Logs everything in the specification, including e.g.
|
LogRepository |
getLogRepository() |
groovy.lang.MetaClass |
getMetaClass() |
Object |
getProperty(String property) |
RequestSpecification |
getRequestSpecification() |
RequestSpecification |
headers()
Logs only the headers.
|
RequestSpecification |
ifValidationFails()
Logs everything if a test validation fails.
|
RequestSpecification |
ifValidationFails(LogDetail logDetail)
Logs with the supplied log detail only if the validation fails.
|
RequestSpecification |
ifValidationFails(LogDetail logDetail,
boolean shouldPrettyPrint)
Logs all parameters only if the validations fail.
|
Object |
invokeMethod(String method,
Object arguments) |
RequestSpecification |
method()
Only logs the request method.
|
RequestSpecification |
parameters()
Logs only the parameters of the request.
|
RequestSpecification |
params()
Logs only the parameters of the request.
|
void |
setLogRepository(LogRepository value) |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(String property,
Object value) |
void |
setRequestSpecification(RequestSpecification value) |
RequestSpecification |
uri()
Only logs the request uri.
|
getPrintStream, shouldPrettyPrint, shouldUrlEncodeRequestUri
public RequestSpecification getRequestSpecification()
public void setRequestSpecification(RequestSpecification value)
public LogRepository getLogRepository()
public void setLogRepository(LogRepository value)
public RequestSpecification params()
RequestLogSpecification
RequestLogSpecification.parameters()
but slightly shorter syntax.params
in interface RequestLogSpecification
public RequestSpecification parameters()
RequestLogSpecification
RequestLogSpecification.params()
but more explicit syntax.parameters
in interface RequestLogSpecification
public RequestSpecification uri()
RequestLogSpecification
uri
in interface RequestLogSpecification
public RequestSpecification method()
RequestLogSpecification
method
in interface RequestLogSpecification
public RequestSpecification body()
LogSpecification
body
in interface LogSpecification<RequestSpecification>
public RequestSpecification body(boolean shouldPrettyPrint)
LogSpecification
body
in interface LogSpecification<RequestSpecification>
shouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public RequestSpecification all(boolean shouldPrettyPrint)
LogSpecification
all
in interface LogSpecification<RequestSpecification>
shouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public RequestSpecification everything(boolean shouldPrettyPrint)
LogSpecification
everything
in interface LogSpecification<RequestSpecification>
shouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public RequestSpecification all()
LogSpecification
all
in interface LogSpecification<RequestSpecification>
public RequestSpecification everything()
LogSpecification
everything
in interface LogSpecification<RequestSpecification>
public RequestSpecification headers()
LogSpecification
headers
in interface LogSpecification<RequestSpecification>
public RequestSpecification cookies()
LogSpecification
cookies
in interface LogSpecification<RequestSpecification>
public RequestSpecification ifValidationFails()
LogSpecification
ifValidationFails
in interface LogSpecification<RequestSpecification>
public RequestSpecification ifValidationFails(LogDetail logDetail)
LogSpecification
ifValidationFails
in interface LogSpecification<RequestSpecification>
logDetail
- The log detailpublic RequestSpecification ifValidationFails(LogDetail logDetail, boolean shouldPrettyPrint)
LogSpecification
ifValidationFails
in interface LogSpecification<RequestSpecification>
logDetail
- The log detailshouldPrettyPrint
- true
if the body should be pretty-printed, false
otherwise.public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
getMetaClass
in class LogSpecificationImpl
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
setMetaClass
in class LogSpecificationImpl
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
invokeMethod
in class LogSpecificationImpl
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
getProperty
in class LogSpecificationImpl
public void setProperty(String property, Object value)
setProperty
in interface groovy.lang.GroovyObject
setProperty
in class LogSpecificationImpl
Copyright © 2010–2019. All rights reserved.