WebIntegrationTestContext
class WebIntegrationTestContext(env: UnsafeMutableEnvironment) : TestMutableInjectionEnvironment, MultiClientProvider
Content copied to clipboard
Context within which integration tests are run.
This is similar to any regular Tegral DI test environment (as in, you can get, put elements, etc.), with the addition of the ability to retrieve HTTP clients to send requests to Ktor applications present in the environment.
Constructors
Functions
Link copied to clipboard
Retrieves a HttpClient with default configurations for the KtorTestApplication with the given name.
Link copied to clipboard
open override fun createClient(block: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit): HttpClient
Content copied to clipboard
open override fun createClient(appName: String?, block: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit): HttpClient
Content copied to clipboard
Retrieves a HttpClient with default configurations and the configurations provided in the given block for the KtorTestApplication with the given name.
Link copied to clipboard
open override fun <T : Any> createInjector(identifier: Identifier<T>, onInjection: (T) -> Unit): Injector<T>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun <T : Any> getResolverOrNull(identifier: Identifier<T>): IdentifierResolver<T>?
Content copied to clipboard