ktor-client-tests
Module Contents
alltypes
Module Contents
class
BuildersTest
:
ClientLoader
Module Contents
BuildersTest
(
)
fun
getEmptyResponseTest
(
)
:
Unit
fun
testDefaultRequest
(
)
:
Unit
fun
testNotFound
(
)
:
Unit
abstract
expect
class
ClientLoader
Module Contents
ClientLoader
(
timeoutSeconds
:
Int
=
60
)
fun
clientTests
(
skipEngines
:
List
<
String
>
=
emptyList()
,
block
:
suspend
TestClientBuilder
<
HttpClientEngineConfig
>
.
(
)
->
Unit
)
:
Unit
fun
dumpCoroutines
(
)
:
Unit
lateinit
var
engine
:
HttpClientEngineContainer
@JvmStatic
fun
engines
(
)
:
List
<
HttpClientEngineContainer
>
open
val
timeout
:
CoroutinesTimeout
fun
waitForAllCoroutines
(
)
:
Unit
abstract
class
HttpClientTest
:
TestWithKtor
Module Contents
HttpClientTest
(
factory
:
HttpClientEngineFactory
<
*
>
)
fun
configCopiesOldFeaturesAndInterceptors
(
)
:
Unit
open
val
server
:
ApplicationEngine
fun
testErrorInWritingPropagates
(
)
:
<ERROR CLASS>
fun
testWithNoParentJob
(
)
:
Unit
abstract
class
SslOverProxyTest
<
T
:
HttpClientEngineConfig
>
:
TestWithKtor
Module Contents
SslOverProxyTest
(
factory
:
HttpClientEngineFactory
<
T
>
)
protected
abstract
fun
T
.
disableCertificatePinning
(
)
:
Unit
open
val
server
:
<ERROR CLASS>
fun
testHttpsOverProxy
(
)
:
<ERROR CLASS>
protected
val
trustAllCertificates
:
Array
<
X509TrustManager
>
protected
val
unsafeSslContext
:
<ERROR CLASS>
class
TestClientBuilder
<
T
:
HttpClientEngineConfig
>
Module Contents
TestClientBuilder
(
config
:
HttpClientConfig
<
T
>
.
(
)
->
Unit
=
{}
,
test
:
suspend
TestInfo
.
(
client
:
HttpClient
)
->
Unit
=
{}
,
after
:
suspend
(
client
:
HttpClient
)
->
Unit
=
{}
,
repeatCount
:
Int
=
1
,
dumpAfterDelay
:
Long
=
-1
,
concurrency
:
Int
=
1
)
var
after
:
suspend
(
client
:
HttpClient
)
->
Unit
var
concurrency
:
Int
var
config
:
HttpClientConfig
<
T
>
.
(
)
->
Unit
var
dumpAfterDelay
:
Long
var
repeatCount
:
Int
var
test
:
suspend
TestInfo
.
(
client
:
HttpClient
)
->
Unit
class
TestInfo
Module Contents
TestInfo
(
threadId
:
Int
,
attempt
:
Int
)
val
attempt
:
Int
val
threadId
:
Int
abstract
class
TestWithKtor
Module Contents
TestWithKtor
(
)
abstract
val
server
:
ApplicationEngine
protected
val
serverPort
:
Int
fun
startServer
(
)
:
Unit
fun
stopServer
(
)
:
Unit
protected
val
testUrl
:
String
open
val
timeout
:
CoroutinesTimeout
io.ktor.application.Application
Module Contents
fun
Application
.
buildersTest
(
)
:
Unit
fun
Application
.
cookiesTest
(
)
:
Unit
fun
Application
.
jsonTest
(
)
:
Unit
fun
Application
.
uploadTest
(
)
:
Unit
kotlin.collections.List
Module Contents
fun
List
<
PartData
>
.
makeString
(
)
:
String
package
io.ktor.client.tests
Module Contents
class
BuildersTest
:
ClientLoader
Module Contents
BuildersTest
(
)
fun
getEmptyResponseTest
(
)
:
Unit
fun
testDefaultRequest
(
)
:
Unit
fun
testNotFound
(
)
:
Unit
abstract
class
HttpClientTest
:
TestWithKtor
Module Contents
HttpClientTest
(
factory
:
HttpClientEngineFactory
<
*
>
)
fun
configCopiesOldFeaturesAndInterceptors
(
)
:
Unit
open
val
server
:
ApplicationEngine
fun
testErrorInWritingPropagates
(
)
:
<ERROR CLASS>
fun
testWithNoParentJob
(
)
:
Unit
abstract
class
SslOverProxyTest
<
T
:
HttpClientEngineConfig
>
:
TestWithKtor
Module Contents
SslOverProxyTest
(
factory
:
HttpClientEngineFactory
<
T
>
)
protected
abstract
fun
T
.
disableCertificatePinning
(
)
:
Unit
open
val
server
:
<ERROR CLASS>
fun
testHttpsOverProxy
(
)
:
<ERROR CLASS>
protected
val
trustAllCertificates
:
Array
<
X509TrustManager
>
protected
val
unsafeSslContext
:
<ERROR CLASS>
package
io.ktor.client.tests.utils
Module Contents
abstract
expect
class
ClientLoader
Module Contents
ClientLoader
(
timeoutSeconds
:
Int
=
60
)
fun
clientTests
(
skipEngines
:
List
<
String
>
=
emptyList()
,
block
:
suspend
TestClientBuilder
<
HttpClientEngineConfig
>
.
(
)
->
Unit
)
:
Unit
fun
dumpCoroutines
(
)
:
Unit
lateinit
var
engine
:
HttpClientEngineContainer
@JvmStatic
fun
engines
(
)
:
List
<
HttpClientEngineContainer
>
open
val
timeout
:
CoroutinesTimeout
fun
waitForAllCoroutines
(
)
:
Unit
const
val
TCP_SERVER
:
String
const
val
TEST_SERVER
:
String
const
val
TEST_WEBSOCKET_SERVER
:
String
class
TestClientBuilder
<
T
:
HttpClientEngineConfig
>
Module Contents
TestClientBuilder
(
config
:
HttpClientConfig
<
T
>
.
(
)
->
Unit
=
{}
,
test
:
suspend
TestInfo
.
(
client
:
HttpClient
)
->
Unit
=
{}
,
after
:
suspend
(
client
:
HttpClient
)
->
Unit
=
{}
,
repeatCount
:
Int
=
1
,
dumpAfterDelay
:
Long
=
-1
,
concurrency
:
Int
=
1
)
var
after
:
suspend
(
client
:
HttpClient
)
->
Unit
var
concurrency
:
Int
var
config
:
HttpClientConfig
<
T
>
.
(
)
->
Unit
var
dumpAfterDelay
:
Long
var
repeatCount
:
Int
var
test
:
suspend
TestInfo
.
(
client
:
HttpClient
)
->
Unit
class
TestInfo
Module Contents
TestInfo
(
threadId
:
Int
,
attempt
:
Int
)
val
attempt
:
Int
val
threadId
:
Int
abstract
class
TestWithKtor
Module Contents
TestWithKtor
(
)
abstract
val
server
:
ApplicationEngine
protected
val
serverPort
:
Int
fun
startServer
(
)
:
Unit
fun
stopServer
(
)
:
Unit
protected
val
testUrl
:
String
open
val
timeout
:
CoroutinesTimeout
fun
TestClientBuilder
<
*
>
.
after
(
block
:
suspend
(
client
:
HttpClient
)
->
Unit
)
:
Unit
inline
expect
fun
<
reified
T
:
Throwable
>
assertFailsAndContainsCause
(
block
:
(
)
->
Unit
)
:
Unit
inline
expect
fun
<
reified
T
:
Throwable
>
assertFailsWith
(
block
:
(
)
->
Unit
)
:
Unit
fun
<
T
:
HttpClientEngineConfig
>
TestClientBuilder
<
T
>
.
config
(
block
:
HttpClientConfig
<
T
>
.
(
)
->
Unit
)
:
Unit
kotlin.collections.List
Module Contents
fun
List
<
PartData
>
.
makeString
(
)
:
String
fun
main
(
)
:
Unit
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>
fun
<
T
:
HttpClientEngineConfig
>
testWithEngine
(
factory
:
HttpClientEngineFactory
<
T
>
,
loader
:
ClientLoader
?
=
null
,
block
:
suspend
TestClientBuilder
<
T
>
.
(
)
->
Unit
)
:
<ERROR CLASS>
package
io.ktor.client.tests.utils.tests
Module Contents
io.ktor.application.Application
Module Contents
fun
Application
.
buildersTest
(
)
:
Unit
fun
Application
.
cookiesTest
(
)
:
Unit
fun
Application
.
jsonTest
(
)
:
Unit
fun
Application
.
uploadTest
(
)
:
Unit