ControllerTestContext
interface ControllerTestContext : TestMutableInjectionEnvironment, ClientProvider
Content copied to clipboard
The context provided to applications in TegralControllerTest.test's block.
Three kinds of elements are available:
Elements from the Tegral DI test environment (provided via TestMutableInjectionEnvironment)
The test Ktor clients (provided via ClientProvider)
Additional configuration from the TestApplicationBuilder (provided via applicationBuilder)
Functions
Link copied to clipboard
abstract fun applicationBuilder(block: TestApplicationBuilder.() -> Unit)
Content copied to clipboard
Provides this test's TestApplicationBuilder in the lambda, which can be used to further set up Ktor's test facilities.
Link copied to clipboard
abstract fun createClient(block: HttpClientConfig<out HttpClientEngineConfig>.() -> Unit): HttpClient
Content copied to clipboard
Link copied to clipboard
abstract fun <T : Any> createInjector(identifier: Identifier<T>, onInjection: (T) -> Unit): Injector<T>
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun <T : Any> getResolverOrNull(identifier: Identifier<T>): IdentifierResolver<T>?
Content copied to clipboard