Package ratpack.test
Interface ApplicationUnderTest
-
- All Known Subinterfaces:
CloseableApplicationUnderTest,EmbeddedApp,GroovyEmbeddedApp
- All Known Implementing Classes:
GroovyRatpackMainApplicationUnderTest,MainClassApplicationUnderTest,MockApi,ServerBackedApplicationUnderTest
public interface ApplicationUnderTestA Ratpack application that is being tested, or used at test time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.net.URIgetAddress()The address of the application under test, which is guaranteed to be listening for requests.default TestHttpClientgetHttpClient()Creates a new test HTTP client that makes requests to this application.
-
-
-
Method Detail
-
getAddress
java.net.URI getAddress()
The address of the application under test, which is guaranteed to be listening for requests.Implementations should start the application if it has not already been started before returning from this method.
- Returns:
- the address of the application under test
-
getHttpClient
default TestHttpClient getHttpClient()
Creates a new test HTTP client that makes requests to this application.- Returns:
- a new test HTTP client that tests this application
-
-