com.jayway.restassured.internal
Class TestSpecificationImpl

java.lang.Object
  extended by com.jayway.restassured.internal.TestSpecificationImpl
All Implemented Interfaces:
RequestSender, groovy.lang.GroovyObject

public class TestSpecificationImpl
extends Object
implements RequestSender, groovy.lang.GroovyObject


Constructor Summary
TestSpecificationImpl(RequestSpecification requestSpecification, ResponseSpecification responseSpecification)
           
 
Method Summary
 Response delete(String path, Map pathParams)
          Perform a DELETE request to a path.
 Response delete(String path, Object[] pathParams)
          Perform a DELETE request to a path.
 Response get(String path, Map pathParams)
          Perform a GET request to a path.
 Response get(String path, Object[] pathParams)
          Perform a GET request to a path.
 groovy.lang.MetaClass getMetaClass()
           
 Object getProperty(String property)
           
 RequestSpecification getRequestSpecification()
           
 ResponseSpecification getResponseSpecification()
           
 Response head(String path, Map pathParams)
          Perform a HEAD request to a path.
 Response head(String path, Object[] pathParams)
          Perform a HEAD request to a path.
 Object invokeMethod(String method, Object arguments)
           
 Response post(String path, Map pathParams)
          Perform a POST request to a path.
 Response post(String path, Object[] pathParams)
          Perform a POST request to a path.
 Response put(String path, Map pathParams)
          Perform a PUT request to a path.
 Response put(String path, Object[] pathParams)
          Perform a PUT request to a path.
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setProperty(String property, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSpecificationImpl

public TestSpecificationImpl(RequestSpecification requestSpecification,
                             ResponseSpecification responseSpecification)
Method Detail

getMetaClass

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

setMetaClass

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

invokeMethod

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

getProperty

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

setProperty

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

get

public Response get(String path,
                    Object[] pathParams)
Description copied from interface: RequestSender
Perform a GET request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
get in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters. E.g. if path is "/book/{hotelId}/{roomNumber}" you can do get("/book/{hotelName}/{roomNumber}", "Hotels R Us", 22);.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

post

public Response post(String path,
                     Object[] pathParams)
Description copied from interface: RequestSender
Perform a POST request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
post in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters. E.g. if path is "/book/{hotelId}/{roomNumber}" you can do post("/book/{hotelName}/{roomNumber}", "Hotels R Us", 22);.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

put

public Response put(String path,
                    Object[] pathParams)
Description copied from interface: RequestSender
Perform a PUT request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
put in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters. E.g. if path is "/book/{hotelId}/{roomNumber}" you can do put("/book/{hotelName}/{roomNumber}", "Hotels R Us", 22);.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

delete

public Response delete(String path,
                       Object[] pathParams)
Description copied from interface: RequestSender
Perform a DELETE request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
delete in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters. E.g. if path is "/book/{hotelId}/{roomNumber}" you can do delete("/book/{hotelName}/{roomNumber}", "Hotels R Us", 22);.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

head

public Response head(String path,
                     Object[] pathParams)
Description copied from interface: RequestSender
Perform a HEAD request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
head in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters. E.g. if path is "/book/{hotelId}/{roomNumber}" you can do head("/book/{hotelName}/{roomNumber}", "Hotels R Us", 22);.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

get

public Response get(String path,
                    Map pathParams)
Description copied from interface: RequestSender
Perform a GET request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
get in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

post

public Response post(String path,
                     Map pathParams)
Description copied from interface: RequestSender
Perform a POST request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
post in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

put

public Response put(String path,
                    Map pathParams)
Description copied from interface: RequestSender
Perform a PUT request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
put in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

delete

public Response delete(String path,
                       Map pathParams)
Description copied from interface: RequestSender
Perform a DELETE request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
delete in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

head

public Response head(String path,
                     Map pathParams)
Description copied from interface: RequestSender
Perform a HEAD request to a path. Normally the path doesn't have to be fully-qualified e.g. you don't need to specify the path as http://localhost:8080/path. In this case it's enough to use /path.

Specified by:
head in interface RequestSender
Parameters:
path - The path to send the request to.
pathParams - The path parameters.
Returns:
The response of the request. The response can only be returned if you don't use any REST Assured response expectations.

getRequestSpecification

public RequestSpecification getRequestSpecification()

getResponseSpecification

public ResponseSpecification getResponseSpecification()


Copyright © 2010-2011. All Rights Reserved.