public interface EmbeddedApplication extends ApplicationUnderTest, Closeable
This mechanism can be used for functionally testing isolated sections of an application, or for testing general libraries that provide reusable functionality (e.g. Ratpack Guice modules).
Different implementations expose different API that can be used to define the actual application under test.
As embedded applications also implement ApplicationUnderTest
, they are suitable for use with clients accessing the app via HTTP.
Implementations must ensure that the application is up and receiving request when returning from ApplicationUnderTest.getAddress()
.
Be sure to Closeable.close()
the application after use to free resources.
LaunchConfigEmbeddedApplication
Modifier and Type | Method and Description |
---|---|
RatpackServer |
getServer()
The server for the application.
|
getAddress
RatpackServer getServer()
Calling this method does not implicitly start the server.