abstract expect class ClientLoader
Helper interface to test client. |
|
class TestClientBuilder<T : HttpClientEngineConfig> |
|
class TestInfo |
|
abstract class TestWithKtor |
const val TCP_SERVER: String
Proxy server url for tests. |
|
const val TEST_SERVER: String
Web url for tests. |
|
const val TEST_WEBSOCKET_SERVER: String
Websocket server url for tests. |
fun TestClientBuilder<*>.after(block: suspend (client: HttpClient) -> Unit): Unit |
|
expect fun <T : Throwable> assertFailsAndContainsCause(block: () -> Unit): Unit
Asserts that block completed with given type of root cause. |
|
expect fun <T : Throwable> assertFailsWith(block: () -> Unit): Unit
Asserts that a block fails with a specific exception of type T being thrown. |
|
fun <T : HttpClientEngineConfig> TestClientBuilder<T>.config(block: HttpClientConfig<T>.() -> Unit): Unit |
|
fun main(): Unit
Start server for tests. |
|
fun makeArray(size: Int): ByteArray |
|
fun makeString(size: Int): String |
|
fun TestClientBuilder<*>.test(block: suspend TestInfo.(client: HttpClient) -> Unit): Unit |
|
fun testWithEngine(engine: HttpClientEngine, block: suspend TestClientBuilder<*>.() -> Unit): <ERROR CLASS>
Perform test with selected client engine. fun <T : HttpClientEngineConfig> testWithEngine(factory: HttpClientEngineFactory<T>, loader: ClientLoader? = null, block: suspend TestClientBuilder<T>.() -> Unit): <ERROR CLASS>
Perform test with selected client engine factory. |