Package | Description |
---|---|
ratpack.groovy.test.handling |
Modifier and Type | Method and Description |
---|---|
GroovyRequestFixture |
GroovyRequestFixture.body(byte[] bytes,
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(String text,
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.header(String name,
String value)
Set a request header value.
|
GroovyRequestFixture |
GroovyRequestFixture.launchConfig(Action<? super LaunchConfigBuilder> action)
Configures the launch config to have no base dir and given configuration.
|
GroovyRequestFixture |
GroovyRequestFixture.launchConfig(Path baseDir,
Action<? super LaunchConfigBuilder> action)
Configures the launch config to have the given base dir and given configuration.
|
GroovyRequestFixture |
GroovyRequestFixture.localAddress(HostAndPort local)
Set the local address to which this request is made.
|
GroovyRequestFixture |
GroovyRequestFixture.method(String method)
Set the request method (case insensitive).
|
GroovyRequestFixture |
GroovyRequestFixture.pathBinding(Map<String,String> pathTokens)
Adds a path binding, with the given path tokens.
|
GroovyRequestFixture |
GroovyRequestFixture.pathBinding(String boundTo,
String pastBinding,
Map<String,String> pathTokens)
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(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(String name,
String value)
Set a response header value.
|
GroovyRequestFixture |
GroovyRequestFixture.timeout(int timeoutSeconds)
Sets the maximum time to allow the handler under test to produce a result.
|
GroovyRequestFixture |
GroovyRequestFixture.uri(String uri)
The URI of the request.
|