ApplicationTestBuilder
A builder for a test that uses TestApplication.
Properties
Returns an instance of Application used in this test. This application might be not started if used before startApplication was called, or any client request was made.
Returns the current client attached to the test application instance.
Functions
Adds a module to TestApplication.
Creates a client with a custom configuration. For example, to send JSON data in a test POST/PUT request, you can install the ContentNegotiation
plugin:
Adds a configuration block for the TestApplicationEngine.
Builds an environment using block.
Builds mocks for external services using ExternalServicesBuilder.
Installs routing into TestApplication
Adds a configuration block for the ServerConfig.
Starts instance of TestApplication. Usually, users do not need to call this method because application will start on the first client call. But it's still useful when you need to test your application lifecycle events.