com.jayway.restassured.internal
Class ResponseLogSpecificationImpl

java.lang.Object
  extended by com.jayway.restassured.internal.LogSpecificationImpl
      extended by com.jayway.restassured.internal.ResponseLogSpecificationImpl
All Implemented Interfaces:
LogSpecification<ResponseSpecification>, ResponseLogSpecification, groovy.lang.GroovyObject

public class ResponseLogSpecificationImpl
extends LogSpecificationImpl
implements ResponseLogSpecification


Constructor Summary
ResponseLogSpecificationImpl()
           
 
Method Summary
 ResponseSpecification all()
          Logs everything in the specification, including e.g.
 ResponseSpecification body()
          Logs only the content of the body.
 ResponseSpecification cookies()
          Logs only the cookies.
 ResponseSpecification everything()
          Logs everything in the specification, including e.g.
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String property)
           
 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
 Object invokeMethod(String method, Object arguments)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(String property, Object value)
           
 ResponseSpecification status()
          Logs only the status line (includes the status code)
 
Methods inherited from class com.jayway.restassured.internal.LogSpecificationImpl
getPrintStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseLogSpecificationImpl

public ResponseLogSpecificationImpl()
Method Detail

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject
Overrides:
getMetaClass in class LogSpecificationImpl

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject
Overrides:
setMetaClass in class LogSpecificationImpl

invokeMethod

public Object invokeMethod(String method,
                           Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject
Overrides:
invokeMethod in class LogSpecificationImpl

getProperty

public Object getProperty(String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject
Overrides:
getProperty in class LogSpecificationImpl

setProperty

public void setProperty(String property,
                        Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject
Overrides:
setProperty in class LogSpecificationImpl

body

public ResponseSpecification body()
Description copied from interface: LogSpecification
Logs only the content of the body.

Specified by:
body in interface LogSpecification<ResponseSpecification>
Returns:
The specification

all

public ResponseSpecification all()
Description copied from interface: LogSpecification
Logs everything in the specification, including e.g. headers, cookies, body.

Specified by:
all in interface LogSpecification<ResponseSpecification>
Returns:
The specification

everything

public ResponseSpecification everything()
Description copied from interface: LogSpecification
Logs everything in the specification, including e.g. headers, cookies, body.

Specified by:
everything in interface LogSpecification<ResponseSpecification>
Returns:
The specification

headers

public ResponseSpecification headers()
Description copied from interface: LogSpecification
Logs only the headers.

Specified by:
headers in interface LogSpecification<ResponseSpecification>
Returns:
The specification

cookies

public ResponseSpecification cookies()
Description copied from interface: LogSpecification
Logs only the cookies.

Specified by:
cookies in interface LogSpecification<ResponseSpecification>
Returns:
The specification

status

public ResponseSpecification status()
Description copied from interface: ResponseLogSpecification
Logs only the status line (includes the status code)

Specified by:
status in interface ResponseLogSpecification
Returns:
The response specification

ifError

public ResponseSpecification ifError()
Description copied from interface: ResponseLogSpecification
Logs everything only if an error occurs (status code >= 400).

Specified by:
ifError in interface ResponseLogSpecification
Returns:
The response specification

ifStatusCodeIsEqualTo

public ResponseSpecification ifStatusCodeIsEqualTo(int statusCode)
Description copied from interface: ResponseLogSpecification
Logs everything only if if the status code is equal to statusCode.

Specified by:
ifStatusCodeIsEqualTo in interface ResponseLogSpecification
Parameters:
statusCode - The status code
Returns:
The response specification

ifStatusCodeMatches

public ResponseSpecification ifStatusCodeMatches(org.hamcrest.Matcher<Integer> matcher)
Description copied from interface: ResponseLogSpecification
Logs everything only if if the status code matches the supplied matcher

Specified by:
ifStatusCodeMatches in interface ResponseLogSpecification
Parameters:
matcher - The hamcrest matcher
Returns:
The response specification


Copyright © 2010-2011. All Rights Reserved.