smalltalk-matrix/matrix/matrix-http/src/testFixtures/kotlin/fake/FakeMatrixHttpClient.kt
2022-02-27 21:48:14 +00:00

11 lines
310 B
Kotlin

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
}
}