Package | Description |
---|---|
ratpack.groovy.test.handling |
Modifier and Type | Method and Description |
---|---|
GroovyRequestFixture |
GroovyRequestFixture.body(byte[] bytes,
java.lang.String contentType)
Sets the request body to be the given bytes, and adds a
Content-Type request header of the given value. |
GroovyRequestFixture |
GroovyRequestFixture.body(java.lang.String text,
java.lang.String contentType)
Sets the request body to be the given string in utf8 bytes, and adds a
Content-Type request header of the given value. |
GroovyRequestFixture |
GroovyRequestFixture.form(java.util.Map<java.lang.String,java.lang.String> fields)
Sets the fields on a multipart form (see RFC2388)
|
GroovyRequestFixture |
GroovyRequestFixture.header(java.lang.CharSequence name,
java.lang.String value)
Set a request header value.
|
GroovyRequestFixture |
GroovyRequestFixture.localAddress(com.google.common.net.HostAndPort local)
Set the local address to which this request is made.
|
GroovyRequestFixture |
GroovyRequestFixture.method(java.lang.String method)
Set the request method (case insensitive).
|
GroovyRequestFixture |
GroovyRequestFixture.pathBinding(java.util.Map<java.lang.String,java.lang.String> pathTokens)
Adds a path binding, with the given path tokens.
|
GroovyRequestFixture |
GroovyRequestFixture.pathBinding(java.lang.String boundTo,
java.lang.String pastBinding,
java.util.Map<java.lang.String,java.lang.String> pathTokens)
Adds a path binding, with the given path tokens and parts.
|
GroovyRequestFixture |
GroovyRequestFixture.pathBinding(java.lang.String boundTo,
java.lang.String pastBinding,
java.util.Map<java.lang.String,java.lang.String> pathTokens,
java.lang.String description)
Adds a path binding, with the given path tokens and parts.
|
GroovyRequestFixture |
GroovyRequestFixture.registry(Action<? super RegistrySpec> action)
Configures the context registry.
|
GroovyRequestFixture |
GroovyRequestFixture.registry(Closure<?> closure)
A closure friendly overload of
registry(Action) . |
GroovyRequestFixture |
GroovyRequestFixture.remoteAddress(com.google.common.net.HostAndPort remote)
Set the remote address from which the request is made.
|
static GroovyRequestFixture |
GroovyRequestFixture.requestFixture()
Create a Groovy request fixture, for unit testing a
Handler . |
static GroovyRequestFixture |
GroovyRequestFixture.requestFixture(RequestFixture requestFixture)
Create a Groovy request fixture, for unit testing a
Handler , by wrapping the given RequestFixture . |
GroovyRequestFixture |
GroovyRequestFixture.responseHeader(java.lang.CharSequence name,
java.lang.String value)
Set a response header value.
|
GroovyRequestFixture |
GroovyRequestFixture.serverConfig(Action<? super ServerConfigBuilder> action)
Configures the server config to have no base dir and given configuration.
|
GroovyRequestFixture |
GroovyRequestFixture.timeout(int timeoutSeconds)
Sets the maximum time to allow the handler under test to produce a result.
|
GroovyRequestFixture |
GroovyRequestFixture.uri(java.lang.String uri)
The URI of the request.
|