A B C D E F G H I J L M N O P R S T U W Y
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- add() - Method in interface ratpack.test.http.MultipartFileSpec
-
Add the file to the parent multipart form
- addDefaultImpositions(ImpositionsSpec) - Method in class ratpack.test.ServerBackedApplicationUnderTest
-
Adds default impositions, that make sense in most cases.
- addImpositions(ImpositionsSpec) - Method in class ratpack.test.ServerBackedApplicationUnderTest
-
Adds impositions to be imposed on the server while it is being created and starting.
- ApplicationUnderTest - Interface in ratpack.test
-
A Ratpack application that is being tested, or used at test time.
B
- 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.
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.embed.EphemeralBaseDir
-
Deletes the base dir from the file system.
- close() - Method in interface ratpack.test.exec.ExecHarness
-
Shuts down the thread pool backing this harness.
- close() - Method in class ratpack.test.ServerBackedApplicationUnderTest
-
Delegates to
stop()
. - CloseableApplicationUnderTest - Interface in ratpack.test
-
An
ApplicationUnderTest
that is able to be shut down. - closeOnExit() - Method in interface ratpack.test.embed.EphemeralBaseDir
-
Add's a JVM shutdown hook that will
EphemeralBaseDir.close()
this base dir. - contentType(String) - Method in interface ratpack.test.http.MultipartFileSpec
-
Specify the content type
- createImpositions() - Method in class ratpack.test.ServerBackedApplicationUnderTest
-
Creates the
Impositions
to impose on the server. - createServer() - Method in class ratpack.test.MainClassApplicationUnderTest
-
Starts the Ratpack server by invoking the
public static void main(String[])
method of the “main class” backing this object. - createServer() - Method in class ratpack.test.ServerBackedApplicationUnderTest
-
Creates the server to be tested.
D
- data(byte[]) - Method in interface ratpack.test.http.MultipartFileSpec
-
Specify the file contents
- data(String) - Method in interface ratpack.test.http.MultipartFileSpec
-
Specify the file contents
- 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()
thenTypedData.getText()
. - deleteText(String) - Method in interface ratpack.test.http.TestHttpClient
-
A convenience method for doing a DELETE request then calling
ReceivedResponse.getBody()
thenTypedData.getText()
. - dir(File) - Static method in interface ratpack.test.embed.EphemeralBaseDir
-
Creates a new base dir, using the given dir as the root.
E
- EmbeddedApp - Interface in ratpack.test.embed
-
An application created and used at runtime, useful for functionally testing subsets of functionality.
- encoding(String) - Method in interface ratpack.test.http.MultipartFileSpec
-
Specify the form field
- EphemeralBaseDir - Interface in ratpack.test.embed
-
A helper for creating a base dir programmatically, typically at test time.
- 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. - ExecHarness - Interface in ratpack.test.exec
-
A utility for testing asynchronous support/service code.
- execute(Operation) - Method in interface ratpack.test.exec.ExecHarness
- execute(Action<? super RegistrySpec>, Function<? super Execution, ? extends Operation>) - Method in interface ratpack.test.exec.ExecHarness
- execute(Function<? super Execution, ? extends Operation>) - Method in interface ratpack.test.exec.ExecHarness
- executeSingle(Operation) - Static method in interface ratpack.test.exec.ExecHarness
- executeSingle(Action<? super RegistrySpec>, Function<? super Execution, ? extends Operation>) - Static method in interface ratpack.test.exec.ExecHarness
- executeSingle(Function<? super Execution, ? extends Operation>) - Static method in interface ratpack.test.exec.ExecHarness
F
- field(String) - Method in interface ratpack.test.http.MultipartFileSpec
-
Specify the form field
- field(String, String) - Method in interface ratpack.test.http.MultipartFormSpec
-
Add a field to the multipart form
- file() - Method in interface ratpack.test.handling.RequestFixture
-
A specification of a file to upload (see RFC2388)
- file() - Method in interface ratpack.test.http.MultipartFormSpec
-
A specification of a file to upload (see RFC2388)
- file(String, String, String) - Method in interface ratpack.test.handling.RequestFixture
-
Uploads a file via a multipart form (see RFC2388)
- fork() - Method in interface ratpack.test.exec.ExecHarness
- form() - Method in interface ratpack.test.handling.RequestFixture
-
A specification of a multipart form (see RFC2388)
- form(Map<String, String>) - Method in interface ratpack.test.handling.RequestFixture
-
Sets the fields on a multipart form (see RFC2388)
- 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.
- 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.
- 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(Factory<? extends RatpackServer>) - Static method in interface ratpack.test.embed.EmbeddedApp
-
Creates an embedded application for the given server.
- fromServer(RatpackServer) - Static method in interface ratpack.test.embed.EmbeddedApp
-
Creates an embedded application for the given server.
- fromServer(ServerConfigBuilder, Action<? super RatpackServerSpec>) - Static method in interface ratpack.test.embed.EmbeddedApp
-
Creates an embedded application using the given server config, and server creating function.
- fromServer(ServerConfig, Action<? super RatpackServerSpec>) - 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 listening for requests.
- getAddress() - Method in interface ratpack.test.embed.EmbeddedApp
-
The address of the application under test, which is guaranteed to be listening for requests.
- getAddress() - Method in class ratpack.test.ServerBackedApplicationUnderTest
-
Returns the address to the root of the server, starting it if necessary.
- 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.
- getController() - Method in interface ratpack.test.exec.ExecHarness
- getCookies() - Method in interface ratpack.test.handling.HandlingResult
-
The cookies to be set as part of the response.
- getCookies(String) - Method in interface ratpack.test.http.TestHttpClient
-
Get cookies with
Path=
attribute equal topath
and all its subpaths. - getHandlerFactory() - Method in class ratpack.test.mock.MockApi
-
Retrieve the factory that generates handlers for requests.
- 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 makes requests to 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
- getRoot() - Method in interface ratpack.test.embed.EphemeralBaseDir
-
The root of the base dir.
- 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.
- getServer() - Method in class ratpack.test.mock.MockApi
- 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()
thenTypedData.getText()
. - getText(String) - Method in interface ratpack.test.http.TestHttpClient
-
A convenience method for doing a GET request then calling
ReceivedResponse.getBody()
thenTypedData.getText()
.
H
- 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. - handle(Handler, Action<? super RequestFixture>) - Static method in interface ratpack.test.handling.RequestFixture
-
Unit test a single
Handler
. - handleChain(Action<? super Chain>) - Method in interface ratpack.test.handling.RequestFixture
-
Similar to
RequestFixture.handle(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
- HandlerFactory - Interface in ratpack.test.handling
-
An interface for creating a Ratpack
Handler
based on the contents of the receivedRequest
. - 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(CharSequence, 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.
- 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.EphemeralBaseDir
-
Creates a new base dir which is actually a jar at the given location.
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
-
An application under test fixture that can be used to test a server started by a “main” method.
- MainClassApplicationUnderTest(Class<?>) - Constructor for class ratpack.test.MainClassApplicationUnderTest
-
Creates a new app under test, based on the given main class.
- method(String) - Method in interface ratpack.test.handling.RequestFixture
-
Set the request method (case insensitive).
- mkdir(String) - Method in interface ratpack.test.embed.EphemeralBaseDir
-
Creates a directory at the given path within the base dir.
- MockApi - Class in ratpack.test.mock
-
A test harness for simulating behavior of remote APIs by starting an
EmbeddedApp
that will handle requests based on the content of the received request. - MultipartFileSpec - Interface in ratpack.test.http
- MultipartFormSpec - Interface in ratpack.test.http
N
- name(String) - Method in interface ratpack.test.http.MultipartFileSpec
-
Specify the uploaded filename
O
- of(Action<? super RatpackServerSpec>) - Static method in interface ratpack.test.embed.EmbeddedApp
-
Creates an embedded application from the given function.
- of(Factory<? extends RatpackServer>) - Static method in class ratpack.test.ServerBackedApplicationUnderTest
-
Creates a new instance backed by the server returned by the given function.
- of(RatpackServer) - Static method in class ratpack.test.ServerBackedApplicationUnderTest
-
Creates a new instance backed by the given server.
- of(HandlerFactory) - Static method in class ratpack.test.mock.MockApi
-
Creates an embedded Ratpack server which delegates handling to the provided factory.
- 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.
- optionsText() - Method in interface ratpack.test.http.TestHttpClient
-
A convenience method for doing a OPTIONS request then calling
ReceivedResponse.getBody()
thenTypedData.getText()
. - optionsText(String) - Method in interface ratpack.test.http.TestHttpClient
-
A convenience method for doing a OPTIONS request then calling
ReceivedResponse.getBody()
thenTypedData.getText()
.
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()
thenTypedData.getText()
. - patchText(String) - Method in interface ratpack.test.http.TestHttpClient
-
A convenience method for doing a PATCH request then calling
ReceivedResponse.getBody()
thenTypedData.getText()
. - path(String) - Method in interface ratpack.test.embed.EphemeralBaseDir
-
Returns a path for the given path within the base dir.
- pathBinding(String, String, Map<String, String>) - Method in interface ratpack.test.handling.RequestFixture
-
Adds a path binding, with the given path tokens and parts.
- pathBinding(String, String, Map<String, String>, String) - Method in interface ratpack.test.handling.RequestFixture
-
Adds a path binding, with the given path tokens and parts.
- pathBinding(Map<String, String>) - Method in interface ratpack.test.handling.RequestFixture
-
Adds a path binding, with the given path tokens.
- 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()
thenTypedData.getText()
. - postText(String) - Method in interface ratpack.test.http.TestHttpClient
-
A convenience method for doing a POST request then calling
ReceivedResponse.getBody()
thenTypedData.getText()
. - protocol(String) - Method in interface ratpack.test.handling.RequestFixture
-
Set the HTTP protocol for the request.
- 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()
thenTypedData.getText()
. - putText(String) - Method in interface ratpack.test.http.TestHttpClient
-
A convenience method for doing a PUT request then calling
ReceivedResponse.getBody()
thenTypedData.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
-
Test fixtures for executing and evaluating
Promise
andOperation
outside of a server instance. - ratpack.test.handling - package ratpack.test.handling
-
Test fixtures for exercising
Handler
implementations without start a fullEmbeddedApp
. - ratpack.test.http - package ratpack.test.http
-
Test fixtures that provide HTTP client interfaces to applications under test.
- ratpack.test.mock - package ratpack.test.mock
-
Support for creating mocks for remote APIs
- receive(Request) - Method in interface ratpack.test.handling.HandlerFactory
- 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.
- request(String, Action<? super RequestSpec>) - Method in interface ratpack.test.http.TestHttpClient
-
Executes the request as specified by the provided
RequestSpec
against the provided path. - request(Action<? super RequestSpec>) - Method in interface ratpack.test.http.TestHttpClient
-
Executes the request as specified by the provided
RequestSpec
. - requestFixture() - Static method in interface ratpack.test.handling.RequestFixture
-
Create a request fixture, for unit testing of
handlers
. - RequestFixture - Interface in ratpack.test.handling
-
A contrived request environment, suitable for unit testing
Handler
implementations. - 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(CharSequence, String) - Method in interface ratpack.test.handling.RequestFixture
-
Set a response header value.
- run(Action<? super Execution>) - Method in interface ratpack.test.exec.ExecHarness
-
Initiates an execution and blocks until it completes.
- run(Action<? super RegistrySpec>, Action<? super Execution>) - Method in interface ratpack.test.exec.ExecHarness
-
Initiates an execution and blocks until it completes.
- runSingle(Action<? super Execution>) - Static method in interface ratpack.test.exec.ExecHarness
-
Convenient form of
ExecHarness.run(Action)
that creates and closes a harness for the run. - runSingle(Action<? super RegistrySpec>, Action<? super Execution>) - Static method in interface ratpack.test.exec.ExecHarness
-
Convenient form of
ExecHarness.run(Action, Action)
that creates and closes a harness for the run.
S
- ServerBackedApplicationUnderTest - Class in ratpack.test
-
An
ApplicationUnderTest
implementation that manages aRatpackServer
. - ServerBackedApplicationUnderTest() - Constructor for class ratpack.test.ServerBackedApplicationUnderTest
- serverConfig(Action<? super ServerConfigBuilder>) - 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
-
Stops the server if it is running.
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(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 - Interface in ratpack.test.http
-
A Http Client focused on testing Ratpack applications.
- 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.EphemeralBaseDir
-
Creates a new base dir, using a newly created dir within the JVM's assigned temp dir.
- tmpJar() - Static method in interface ratpack.test.embed.EphemeralBaseDir
-
Creates a new base dir which is actually a jar created within the JVM's assigned temp dir.
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.
- use(Action<? super EphemeralBaseDir>) - Method in interface ratpack.test.embed.EphemeralBaseDir
-
Executes the given action with this base dir, then closes this base dir.
W
- write(String, String) - Method in interface ratpack.test.embed.EphemeralBaseDir
-
Creates a file with the given string content at the given path within the base dir.
Y
- yield(Action<? super RegistrySpec>, Function<? super Execution, ? extends Promise<T>>) - Method in interface ratpack.test.exec.ExecHarness
-
Synchronously returns a promised value.
- yield(Function<? super Execution, ? extends Promise<T>>) - Method in interface ratpack.test.exec.ExecHarness
-
Synchronously returns a promised value.
- yieldSingle(Action<? super RegistrySpec>, Function<? super Execution, ? extends 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. - yieldSingle(Function<? super Execution, ? extends 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.
All Classes All Packages