Package io.ktor.client.tests.utils
Types
Link copied to clipboard
Helper interface to test client.
Helper interface to test client.
Helper interface to test client.
Link copied to clipboard
class TestClientBuilder<T : HttpClientEngineConfig>(config: HttpClientConfig<T>.() -> Unit, test: suspend TestInfo.(client: HttpClient) -> Unit, after: suspend (client: HttpClient) -> Unit, repeatCount: Int, dumpAfterDelay: Long, concurrency: Int)
Content copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
fun TestClientBuilder<*>.after(block: suspend (client: HttpClient) -> Unit)
Content copied to clipboard
Link copied to clipboard
expect inline fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit)
Content copied to clipboard
Asserts that block completed with given type of root cause.
actual inline fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit)
Content copied to clipboard
Check that block completed with given type of root cause.
actual inline fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit)
Content copied to clipboard
Check that block completed with given type of root cause.
Link copied to clipboard
Link copied to clipboard
fun <T : HttpClientEngineConfig> TestClientBuilder<T>.config(block: HttpClientConfig<T>.() -> Unit)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun TestClientBuilder<*>.test(block: suspend TestInfo.(client: HttpClient) -> Unit)
Content copied to clipboard
Link copied to clipboard
fun testWithEngine(engine: HttpClientEngine, block: suspend TestClientBuilder<*>.() -> Unit)
Content copied to clipboard
Perform test with selected client engine.
fun <T : HttpClientEngineConfig> testWithEngine(factory: HttpClientEngineFactory<T>, loader: ClientLoader? = null, block: suspend TestClientBuilder<T>.() -> Unit)
Content copied to clipboard
Perform test with selected client engine factory.