Package ratpack.test
Interface ApplicationUnderTest
-
- All Known Subinterfaces:
CloseableApplicationUnderTest
,EmbeddedApp
,GroovyEmbeddedApp
- All Known Implementing Classes:
GroovyRatpackMainApplicationUnderTest
,MainClassApplicationUnderTest
,MockApi
,ServerBackedApplicationUnderTest
public interface ApplicationUnderTest
A 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 URI
getAddress()
The address of the application under test, which is guaranteed to be listening for requests.default TestHttpClient
getHttpClient()
Creates a new test HTTP client that makes requests to this application.
-
-
-
Method Detail
-
getAddress
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
-
-