Skip navigation links
A B C D E F G H I J L M O P R S T U Y 

A

addInterceptor(ExecInterceptor, NoArgAction) - Method in interface ratpack.test.exec.ExecHarness
ApplicationUnderTest - Interface in ratpack.test
Provides the address of the running application.

B

BaseDirBuilder - Interface in ratpack.test.embed
 
blocking(Callable<T>) - Method in interface ratpack.test.exec.ExecHarness
body(byte[], String) - Method in interface ratpack.test.handling.RequestFixture
Sets the request body to be the given bytes, and adds a Content-Type request header of the given value.
body(String, String) - Method in interface ratpack.test.handling.RequestFixture
Sets the request body to be the given string in utf8 bytes, and adds a Content-Type request header of the given value.
build(Consumer<? super BaseDirBuilder>) - Method in interface ratpack.test.embed.BaseDirBuilder
 
build() - Method in interface ratpack.test.embed.BaseDirBuilder
Build the baseDir.

C

close() - Method in interface ratpack.test.CloseableApplicationUnderTest
Shuts down the application under test.
close() - Method in interface ratpack.test.embed.EmbeddedApp
Stops the server returned by EmbeddedApp.getServer().
close() - Method in interface ratpack.test.exec.ExecHarness
Shuts down the thread pool backing this harness.
close() - Method in class ratpack.test.ServerBackedApplicationUnderTest
 
CloseableApplicationUnderTest - Interface in ratpack.test
An application under test that is able to be shut down.
createOverrides(Registry) - Method in class ratpack.test.MainClassApplicationUnderTest
 
createServer() - Method in class ratpack.test.MainClassApplicationUnderTest
 
createServer() - Method in class ratpack.test.ServerBackedApplicationUnderTest
 

D

delete() - Method in interface ratpack.test.http.TestHttpClient
Make a DELETE request with a path of "" this is the same as calling delete("")
delete(String) - Method in interface ratpack.test.http.TestHttpClient
Make a DELETE request to the specified path.
deleteText() - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a DELETE request then calling ReceivedResponse.getBody() then TypedData.getText().
deleteText(String) - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a DELETE request then calling ReceivedResponse.getBody() then TypedData.getText().
dir(File) - Static method in interface ratpack.test.embed.BaseDirBuilder
 
dir(String) - Method in interface ratpack.test.embed.BaseDirBuilder
Creates a directory at the given path within the base dir.

E

EmbeddedApp - Interface in ratpack.test.embed
An application created and used at runtime, useful for functionally testing subsets of functionality.
exception(Class<T>) - Method in interface ratpack.test.handling.HandlingResult
The throwable thrown or given to Context.error(Throwable), unless a custom error handler is in use.
exec() - Method in interface ratpack.test.exec.ExecHarness
ExecHarness - Interface in ratpack.test.exec
A utility for testing asynchronous support/service code.
ExecResult<T> - Interface in ratpack.test.exec
The result of an ExecHarness.yield(ratpack.func.Function) operation.

F

file(String) - Method in interface ratpack.test.embed.BaseDirBuilder
Returns a path for the given path within the base dir.
file(String, String) - Method in interface ratpack.test.embed.BaseDirBuilder
Creates a file with the given string content at the given path within the base dir.
fromHandler(Handler) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler.
fromHandler(Path, Handler) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application with a default launch config (ephemeral port) and the given handler.
fromHandlerFactory(Function<? super Registry, ? extends Handler>) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler.
fromHandlerFactory(Path, Function<? super Registry, ? extends Handler>) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application with a default launch config (ephemeral port) and the given handler.
fromHandlers(Action<? super Chain>) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application with a default launch config (no base dir, ephemeral port) and the given handler chain.
fromServer(RatpackServer) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application for the given server.
fromServer(Factory<? extends RatpackServer>) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application for the given server.
fromServer(ServerConfig, Function<? super RatpackServer.Definition.Builder, ? extends RatpackServer.Definition>) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application using the given server config, and server creating function.

G

get() - Method in interface ratpack.test.http.TestHttpClient
Make a GET request with a path of "" this is the same as calling get("")
get(String) - Method in interface ratpack.test.http.TestHttpClient
Make a GET request to the specified path.
getAddress() - Method in interface ratpack.test.ApplicationUnderTest
The address of the application under test, which is guaranteed to be accepting requests.
getAddress() - Method in interface ratpack.test.embed.EmbeddedApp
The address of the application under test, which is guaranteed to be accepting requests.
getAddress() - Method in class ratpack.test.ServerBackedApplicationUnderTest
 
getApplicationUnderTest() - Method in interface ratpack.test.http.TestHttpClient
 
getBodyBytes() - Method in interface ratpack.test.handling.HandlingResult
The response body, as bytes.
getBodyText() - Method in interface ratpack.test.handling.HandlingResult
The response body, interpreted as a utf8 string.
getClientError() - Method in interface ratpack.test.handling.HandlingResult
The client error raised if any, unless a custom client error handler is in use.
getControl() - Method in interface ratpack.test.exec.ExecHarness
The execution control for the harness.
getController() - Method in interface ratpack.test.exec.ExecHarness
getCookies() - Method in interface ratpack.test.http.TestHttpClient
 
getExecution() - Method in interface ratpack.test.exec.ExecHarness
getHeaders() - Method in interface ratpack.test.handling.HandlingResult
The final response headers.
getHttpClient() - Method in interface ratpack.test.ApplicationUnderTest
Creates a new test HTTP client that tests this application.
getRegistry() - Method in interface ratpack.test.handling.HandlingResult
The final state of the context registry.
getRegistry() - Method in interface ratpack.test.handling.RequestFixture
A specification of the context registry.
getRequestRegistry() - Method in interface ratpack.test.handling.HandlingResult
The final state of the request registry.
getResponse() - Method in interface ratpack.test.http.TestHttpClient
 
getSentFile() - Method in interface ratpack.test.handling.HandlingResult
Indicates whether the result of invoking the handler was that it invoked one of the Response.sendFile(java.nio.file.Path) methods.
getServer() - Method in interface ratpack.test.embed.EmbeddedApp
The server for the application.
getStatus() - Method in interface ratpack.test.handling.HandlingResult
The response status information.
getText() - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a GET request then calling ReceivedResponse.getBody() then TypedData.getText().
getText(String) - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a GET request then calling ReceivedResponse.getBody() then TypedData.getText().

H

handle(Handler, Action<? super RequestFixture>) - Static method in interface ratpack.test.handling.RequestFixture
Unit test a single Handler.
handle(Action<? super Chain>, Action<? super RequestFixture>) - Static method in interface ratpack.test.handling.RequestFixture
Unit test a Handler chain.
handle(Handler) - Method in interface ratpack.test.handling.RequestFixture
Invokes the given handler with a newly created Context based on the state of this fixture.
handleChain(Action<? super Chain>) - Method in interface ratpack.test.handling.RequestFixture
Similar to RequestFixture.handle(ratpack.handling.Handler), but for testing a handler chain.
HandlerExceptionNotThrownException - Exception in ratpack.test.handling
Exception thrown when the HandlingResult.exception(type) is called but no exception was thrown.
HandlerExceptionNotThrownException() - Constructor for exception ratpack.test.handling.HandlerExceptionNotThrownException
 
HandlerTimeoutException - Exception in ratpack.test.handling
Thrown when a handler under test takes too long to produce a result.
HandlerTimeoutException(HandlingResult, int) - Constructor for exception ratpack.test.handling.HandlerTimeoutException
Constructor.
HandlingResult - Interface in ratpack.test.handling
Represents the result of testing one or more handlers.
harness() - Static method in interface ratpack.test.exec.ExecHarness
Creates a new execution harness.
harness(int) - Static method in interface ratpack.test.exec.ExecHarness
 
head() - Method in interface ratpack.test.http.TestHttpClient
Make a HEAD request with a path of "" this is the same as calling head("")
head(String) - Method in interface ratpack.test.http.TestHttpClient
Make a HEAD request to the specified path.
header(String, String) - Method in interface ratpack.test.handling.RequestFixture
Set a request header value.

I

isCalledNext() - Method in interface ratpack.test.handling.HandlingResult
Indicates whether the result of invoking the handler was that it delegated to a downstream handler.
isComplete() - Method in interface ratpack.test.exec.ExecResult
Is the result that the execution completed without a value being returned.
isSentResponse() - Method in interface ratpack.test.handling.HandlingResult
Indicates the the handler(s) invoked one of the Response.send() methods.

J

jar(File) - Static method in interface ratpack.test.embed.BaseDirBuilder
 

L

localAddress(HostAndPort) - Method in interface ratpack.test.handling.RequestFixture
Set the local address to which this request is made.

M

MainClassApplicationUnderTest - Class in ratpack.test
 
MainClassApplicationUnderTest(Class<?>) - Constructor for class ratpack.test.MainClassApplicationUnderTest
 
method(String) - Method in interface ratpack.test.handling.RequestFixture
Set the request method (case insensitive).

O

of(RatpackServer) - Static method in interface ratpack.test.ApplicationUnderTest
 
of(Factory<? extends RatpackServer>) - Static method in interface ratpack.test.ApplicationUnderTest
 
of(Class<?>) - Static method in interface ratpack.test.ApplicationUnderTest
 
of(Class<?>, Action<? super RegistrySpec>) - Static method in interface ratpack.test.ApplicationUnderTest
 
of(Function<? super RatpackServer.Definition.Builder, ? extends RatpackServer.Definition>) - Static method in interface ratpack.test.embed.EmbeddedApp
Creates an embedded application from the given function.
options() - Method in interface ratpack.test.http.TestHttpClient
Make a OPTIONS request with a path of "" this is the same as calling options("")
options(String) - Method in interface ratpack.test.http.TestHttpClient
Make a OPTIONS request to the specified path.

P

params(Action<? super ImmutableMultimap.Builder<String, Object>>) - Method in interface ratpack.test.http.TestHttpClient
 
patch() - Method in interface ratpack.test.http.TestHttpClient
Make a PATCH request with a path of "" this is the same as calling patch("")
patch(String) - Method in interface ratpack.test.http.TestHttpClient
Make a PATCH request to the specified path.
patchText() - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a PATCH request then calling ReceivedResponse.getBody() then TypedData.getText().
patchText(String) - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a PATCH request then calling ReceivedResponse.getBody() then TypedData.getText().
pathBinding(Map<String, String>) - Method in interface ratpack.test.handling.RequestFixture
Adds a path binding, with the given path tokens.
pathBinding(String, String, Map<String, String>) - Method in interface ratpack.test.handling.RequestFixture
Adds a path binding, with the given path tokens and parts.
post() - Method in interface ratpack.test.http.TestHttpClient
Make a POST request with a path of "" this is the same as calling post("")
post(String) - Method in interface ratpack.test.http.TestHttpClient
Make a POST request to the specified path.
postText() - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a POST request then calling ReceivedResponse.getBody() then TypedData.getText().
postText(String) - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a GET request then calling ReceivedResponse.getBody() then TypedData.getText().
promise(Action<? super Fulfiller<T>>) - Method in interface ratpack.test.exec.ExecHarness
put() - Method in interface ratpack.test.http.TestHttpClient
Make a PUT request with a path of "" this is the same as calling put("")
put(String) - Method in interface ratpack.test.http.TestHttpClient
Make a PUT request to the specified path.
putText() - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a PUT request then calling ReceivedResponse.getBody() then TypedData.getText().
putText(String) - Method in interface ratpack.test.http.TestHttpClient
A convenience method for doing a PUT request then calling ReceivedResponse.getBody() then TypedData.getText().

R

ratpack.test - package ratpack.test
 
ratpack.test.embed - package ratpack.test.embed
Support for creating embedded applications at test time, for testing Ratpack features and extensions.
ratpack.test.exec - package ratpack.test.exec
 
ratpack.test.handling - package ratpack.test.handling
 
ratpack.test.http - package ratpack.test.http
 
registry(Action<? super RegistrySpec>) - Method in interface ratpack.test.handling.RequestFixture
Configures the context registry.
remoteAddress(HostAndPort) - Method in interface ratpack.test.handling.RequestFixture
Set the remote address from which the request is made.
rendered(Class<T>) - Method in interface ratpack.test.handling.HandlingResult
The object that was rendered to the response.
RequestFixture - Interface in ratpack.test.handling
A contrived request environment, suitable for unit testing Handler implementations.
requestFixture() - Static method in interface ratpack.test.handling.RequestFixture
Create a request fixture, for unit testing of handlers.
requestSpec(Action<? super RequestSpec>) - Method in interface ratpack.test.http.TestHttpClient
 
resetRequest() - Method in interface ratpack.test.http.TestHttpClient
Set the requestSpec back to a No Op default and clear the cookies.
responseHeader(String, String) - Method in interface ratpack.test.handling.RequestFixture
Set a response header value.
run(Action<? super ExecControl>) - Method in interface ratpack.test.exec.ExecHarness
Initiates an execution and blocks until it completes.
runSingle(Action<? super ExecControl>) - Static method in interface ratpack.test.exec.ExecHarness
Convenient form of ExecHarness.run(Action) that creates and closes a harness for the run.

S

ServerBackedApplicationUnderTest - Class in ratpack.test
 
ServerBackedApplicationUnderTest() - Constructor for class ratpack.test.ServerBackedApplicationUnderTest
 
serverConfig(Path, Action<? super ServerConfig.Builder>) - Method in interface ratpack.test.handling.RequestFixture
Configures the server config to have the given base dir and given configuration.
serverConfig(Action<? super ServerConfig.Builder>) - Method in interface ratpack.test.handling.RequestFixture
Configures the server config to have no base dir and given configuration.
stop() - Method in class ratpack.test.ServerBackedApplicationUnderTest
 
stream(Publisher<T>) - Method in interface ratpack.test.exec.ExecHarness

T

test(Action<? super TestHttpClient>) - Method in interface ratpack.test.CloseableApplicationUnderTest
Provides the given action with a test http client for this application, then closes this application.
TestHttpClient - Interface in ratpack.test.http
A Http Client focused on testing Ratpack applications.
testHttpClient(ApplicationUnderTest) - Static method in interface ratpack.test.http.TestHttpClient
A method to create an instance of the default implementation of TestHttpClient.
testHttpClient(ApplicationUnderTest, Action<? super RequestSpec>) - Static method in interface ratpack.test.http.TestHttpClient
A method to create an instance of the default implementation of TestHttpClient.
testHttpClient(RatpackServer) - Static method in interface ratpack.test.http.TestHttpClient
 
testHttpClient(Factory<? extends RatpackServer>) - Static method in interface ratpack.test.http.TestHttpClient
 
timeout(int) - Method in interface ratpack.test.handling.RequestFixture
Sets the maximum time to allow the handler under test to produce a result.
tmpDir() - Static method in interface ratpack.test.embed.BaseDirBuilder
 
tmpJar() - Static method in interface ratpack.test.embed.BaseDirBuilder
 

U

UnexpectedHandlerException - Exception in ratpack.test.handling
Exception throw when a handler throws an exception that is different from the expected type in HandlingResult.exception(class) or when an exception was thrown when trying to access the results of a completed handler.
UnexpectedHandlerException(Throwable) - Constructor for exception ratpack.test.handling.UnexpectedHandlerException
 
uri(String) - Method in interface ratpack.test.handling.RequestFixture
The URI of the request.

Y

yield(Function<ExecControl, Promise<T>>) - Method in interface ratpack.test.exec.ExecHarness
Synchronously returns a promised value.
yieldSingle(Function<ExecControl, Promise<T>>) - Static method in interface ratpack.test.exec.ExecHarness
Creates an exec harness, executes the given function with it before closing it, then returning execution result.
A B C D E F G H I J L M O P R S T U Y 
Skip navigation links