1
0
mirror of https://github.com/ouchadam/small-talk.git synced 2025-01-11 17:43:58 +01:00
smalltalk-matrix/matrix/matrix-http/src/testFixtures/kotlin/fake/FakeMatrixHttpClient.kt

11 lines
310 B
Kotlin
Raw Normal View History

2022-02-24 22:55:56 +01:00
package fake
import app.dapk.st.matrix.http.MatrixHttpClient
import io.mockk.coEvery
import io.mockk.mockk
class FakeMatrixHttpClient : MatrixHttpClient by mockk() {
fun <T : Any> given(request: MatrixHttpClient.HttpRequest<T>, response: T) {
coEvery { execute(request) } returns response
}
}