public class TestSpecificationImpl extends Object implements RequestSender, groovy.lang.GroovyObject
Constructor and Description |
---|
TestSpecificationImpl(RequestSpecification requestSpecification,
ResponseSpecification responseSpecification) |
Modifier and Type | Method and Description |
---|---|
Response |
delete()
Perform a DELETE request to the statically configured path (by default
http://localhost:8080 ). |
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 |
delete(URI uri)
Perform a DELETE request to a
uri . |
Response |
delete(URL url)
Perform a DELETE request to a
url . |
Response |
get()
Perform a GET request to the statically configured path (by default
http://localhost:8080 ). |
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 . |
Response |
get(URI uri)
Perform a GET request to a
uri . |
Response |
get(URL url)
Perform a GET request to a
url . |
groovy.lang.MetaClass |
getMetaClass() |
Object |
getProperty(String property) |
RequestSpecification |
getRequestSpecification() |
ResponseSpecification |
getResponseSpecification() |
Response |
head()
Perform a HEAD request to the statically configured path (by default
http://localhost:8080 ). |
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 . |
Response |
head(URI uri)
Perform a HEAD request to a
uri . |
Response |
head(URL url)
Perform a HEAD request to a
url . |
Object |
invokeMethod(String method,
Object arguments) |
Response |
options()
Perform a OPTIONS request to the statically configured path (by default
http://localhost:8080 ). |
Response |
options(String path,
Map pathParams)
Perform a OPTIONS request to a
path . |
Response |
options(String path,
Object... pathParams)
Perform a OPTIONS request to a
path . |
Response |
options(URI uri)
Perform a OPTIONS request to a
uri . |
Response |
options(URL url)
Perform a OPTIONS request to a
url . |
Response |
patch()
Perform a PATCH request to the statically configured path (by default
http://localhost:8080 ). |
Response |
patch(String path,
Map pathParams)
Perform a PATCH request to a
path . |
Response |
patch(String path,
Object... pathParams)
Perform a PATCH request to a
path . |
Response |
patch(URI uri)
Perform a PATCH request to a
uri . |
Response |
patch(URL url)
Perform a PATCH request to a
url . |
Response |
post()
Perform a POST request to the statically configured path (by default
http://localhost:8080 ). |
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 |
post(URI uri)
Perform a POST request to a
uri . |
Response |
post(URL url)
Perform a POST request to a
url . |
Response |
put()
Perform a PUT request to the statically configured path (by default
http://localhost:8080 ). |
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 . |
Response |
put(URI uri)
Perform a PUT request to a
uri . |
Response |
put(URL url)
Perform a PUT request to a
url . |
Response |
request(Method method)
Perform a request to the pre-configured path (by default
http://localhost:8080 ). |
Response |
request(Method method,
String path,
Object... pathParams)
Perform a HTTP request to a
path . |
Response |
request(Method method,
URI uri)
Perform a request to a
uri . |
Response |
request(Method method,
URL url)
Perform a request to a
url . |
Response |
request(String method)
Perform a custom HTTP request to the pre-configured path (by default
http://localhost:8080 ). |
Response |
request(String method,
String path,
Object... pathParams)
Perform a custom HTTP request to a
path . |
Response |
request(String method,
URI uri)
Perform a custom HTTP request to a
uri . |
Response |
request(String method,
URL url)
Perform a custom HTTP request to a
url . |
void |
setMetaClass(groovy.lang.MetaClass mc) |
void |
setProperty(String property,
Object value) |
public TestSpecificationImpl(RequestSpecification requestSpecification, ResponseSpecification responseSpecification)
public Response get(String path, Object... pathParams)
RequestSenderOptions
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.get
in interface RequestSenderOptions<Response>
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);
.public Response post(String path, Object... pathParams)
RequestSenderOptions
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.post
in interface RequestSenderOptions<Response>
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);
.public Response put(String path, Object... pathParams)
RequestSenderOptions
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.put
in interface RequestSenderOptions<Response>
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);
.public Response delete(String path, Object... pathParams)
RequestSenderOptions
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.delete
in interface RequestSenderOptions<Response>
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);
.public Response head(String path, Object... pathParams)
RequestSenderOptions
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.head
in interface RequestSenderOptions<Response>
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);
.public Response patch(String path, Object... pathParams)
RequestSenderOptions
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.patch
in interface RequestSenderOptions<Response>
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);
.public Response options(String path, Object... pathParams)
RequestSenderOptions
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.options
in interface RequestSenderOptions<Response>
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);
.public Response get(URI uri)
RequestSenderOptions
uri
.get
in interface RequestSenderOptions<Response>
uri
- The uri to send the request to.public Response post(URI uri)
RequestSenderOptions
uri
.post
in interface RequestSenderOptions<Response>
uri
- The uri to send the request to.public Response put(URI uri)
RequestSenderOptions
uri
.put
in interface RequestSenderOptions<Response>
uri
- The uri to send the request to.public Response delete(URI uri)
RequestSenderOptions
uri
.delete
in interface RequestSenderOptions<Response>
uri
- The uri to send the request to.public Response head(URI uri)
RequestSenderOptions
uri
.head
in interface RequestSenderOptions<Response>
uri
- The uri to send the request to.public Response patch(URI uri)
RequestSenderOptions
uri
.patch
in interface RequestSenderOptions<Response>
uri
- The uri to send the request to.public Response options(URI uri)
RequestSenderOptions
uri
.options
in interface RequestSenderOptions<Response>
uri
- The uri to send the request to.public Response get(URL url)
RequestSenderOptions
url
.get
in interface RequestSenderOptions<Response>
url
- The url to send the request to.public Response post(URL url)
RequestSenderOptions
url
.post
in interface RequestSenderOptions<Response>
url
- The url to send the request to.public Response put(URL url)
RequestSenderOptions
url
.put
in interface RequestSenderOptions<Response>
url
- The url to send the request to.public Response delete(URL url)
RequestSenderOptions
url
.delete
in interface RequestSenderOptions<Response>
url
- The url to send the request to.public Response head(URL url)
RequestSenderOptions
url
.head
in interface RequestSenderOptions<Response>
url
- The url to send the request to.public Response patch(URL url)
RequestSenderOptions
url
.patch
in interface RequestSenderOptions<Response>
url
- The url to send the request to.public Response options(URL url)
RequestSenderOptions
url
.options
in interface RequestSenderOptions<Response>
url
- The url to send the request to.public Response get()
RequestSenderOptions
http://localhost:8080
).get
in interface RequestSenderOptions<Response>
public Response post()
RequestSenderOptions
http://localhost:8080
).post
in interface RequestSenderOptions<Response>
public Response put()
RequestSenderOptions
http://localhost:8080
).put
in interface RequestSenderOptions<Response>
public Response delete()
RequestSenderOptions
http://localhost:8080
).delete
in interface RequestSenderOptions<Response>
public Response head()
RequestSenderOptions
http://localhost:8080
).head
in interface RequestSenderOptions<Response>
public Response patch()
RequestSenderOptions
http://localhost:8080
).patch
in interface RequestSenderOptions<Response>
public Response options()
RequestSenderOptions
http://localhost:8080
).options
in interface RequestSenderOptions<Response>
public Response request(Method method)
RequestSenderOptions
http://localhost:8080
).request
in interface RequestSenderOptions<Response>
method
- The HTTP method to usepublic Response request(String method)
RequestSenderOptions
http://localhost:8080
).request
in interface RequestSenderOptions<Response>
method
- The HTTP method to usepublic Response request(Method method, String path, Object... pathParams)
RequestSenderOptions
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.request
in interface RequestSenderOptions<Response>
method
- The HTTP method to usepath
- The path to send the request to.pathParams
- The path parameters. E.g. if path is "/book/{hotelId}/{roomNumber}" you can do request(Method.TRACE,"/book/{hotelName}/{roomNumber}", "Hotels R Us", 22);
.public Response request(String method, String path, Object... pathParams)
RequestSenderOptions
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.request
in interface RequestSenderOptions<Response>
method
- The HTTP method to usepath
- The path to send the request to.pathParams
- The path parameters. E.g. if path is "/book/{hotelId}/{roomNumber}" you can do request("method","/book/{hotelName}/{roomNumber}", "Hotels R Us", 22);
.public Response request(Method method, URI uri)
RequestSenderOptions
uri
.request
in interface RequestSenderOptions<Response>
method
- The HTTP method to useuri
- The uri to send the request to.public Response request(Method method, URL url)
RequestSenderOptions
url
.request
in interface RequestSenderOptions<Response>
method
- The HTTP method to useurl
- The url to send the request to.public Response request(String method, URI uri)
RequestSenderOptions
uri
.request
in interface RequestSenderOptions<Response>
method
- The HTTP method to useuri
- The uri to send the request to.public Response request(String method, URL url)
RequestSenderOptions
url
.request
in interface RequestSenderOptions<Response>
method
- The HTTP method to useurl
- The url to send the request to.public Response get(String path, Map pathParams)
RequestSenderOptions
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.get
in interface RequestSenderOptions<Response>
path
- The path to send the request to.pathParams
- The path parameters.public Response post(String path, Map pathParams)
RequestSenderOptions
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.post
in interface RequestSenderOptions<Response>
path
- The path to send the request to.pathParams
- The path parameters.public Response put(String path, Map pathParams)
RequestSenderOptions
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.put
in interface RequestSenderOptions<Response>
path
- The path to send the request to.pathParams
- The path parameters.public Response delete(String path, Map pathParams)
RequestSenderOptions
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.delete
in interface RequestSenderOptions<Response>
path
- The path to send the request to.pathParams
- The path parameters.public Response head(String path, Map pathParams)
RequestSenderOptions
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.head
in interface RequestSenderOptions<Response>
path
- The path to send the request to.pathParams
- The path parameters.public Response patch(String path, Map pathParams)
RequestSenderOptions
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.patch
in interface RequestSenderOptions<Response>
path
- The path to send the request to.pathParams
- The path parameters.public Response options(String path, Map pathParams)
RequestSenderOptions
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.options
in interface RequestSenderOptions<Response>
path
- The path to send the request to.pathParams
- The path parameters.public RequestSpecification getRequestSpecification()
public ResponseSpecification getResponseSpecification()
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
public void setMetaClass(groovy.lang.MetaClass mc)
setMetaClass
in interface groovy.lang.GroovyObject
public Object invokeMethod(String method, Object arguments)
invokeMethod
in interface groovy.lang.GroovyObject
public Object getProperty(String property)
getProperty
in interface groovy.lang.GroovyObject
Copyright © 2010–2019. All rights reserved.