Reputation: 1431
I've added the dependency for Ktor client mock
testImplementation "io.ktor:ktor-client-mock:$ktor_version"
But still the MockEngine is not resolved.
Upvotes: 5
Views: 1239
Reputation: 1837
I have written an article about Ktor and Ktor client mock where you can review a working example.
The source code is on this GitHub repository https://github.com/xurxodev/integration-testing-kotlin-multiplatform-kata
Review it and let me know if you have some doubts
Upvotes: 1
Reputation: 1431
This is a multi-platform module with no actual implementations. to use in platform modules, jvm in the case of android a corresponding dependency should be used. In this case you should use instead:
testImplementation "io.ktor:ktor-client-mock-jvm:$ktor_version"
Upvotes: 5