DefaultControllerTestContext

class DefaultControllerTestContext(    appBuilder: ApplicationTestBuilder,     environment: TestMutableInjectionEnvironment,     configureClient: KtorTestClientConfig.() -> Unit) : ControllerTestContext, TestMutableInjectionEnvironment, ClientProvider

A default implementation of ControllerTestContext that delegates implementations to existing elements.

Constructors

Link copied to clipboard
fun DefaultControllerTestContext(    appBuilder: ApplicationTestBuilder,     environment: TestMutableInjectionEnvironment,     configureClient: KtorTestClientConfig.() -> Unit)

Functions

Link copied to clipboard
open override fun applicationBuilder(block: TestApplicationBuilder.() -> Unit)

Provides this test's TestApplicationBuilder in the lambda, which can be used to further set up Ktor's test facilities.

Link copied to clipboard
open override fun createClient(block: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit): HttpClient
Link copied to clipboard
open override fun <T : Any> createInjector(identifier: Identifier<T>, onInjection: (T) -> Unit): Injector<T>
Link copied to clipboard
open override fun <T : Any> get(identifier: Identifier<T>): T
Link copied to clipboard
open override fun getAllIdentifiers(): Sequence<Identifier<*>>
Link copied to clipboard
open override fun <T : Any> getOrNull(identifier: Identifier<T>): T?
Link copied to clipboard
open override fun <T : Any> getResolverOrNull(identifier: Identifier<T>): IdentifierResolver<T>?
Link copied to clipboard
open override fun <T : Any> put(declaration: Declaration<T>)

Properties

Link copied to clipboard
open override val client: HttpClient
Link copied to clipboard
open override val components: Map<Identifier<*>, IdentifierResolver<*>>
Link copied to clipboard
open override val metaEnvironment: InjectionEnvironment