Alexey Soshin
Jan 26, 2023

--

I would pass the HTTP client to the `mockApplication` function alongside the mocks:

`

fun ApplicationTestBuilder.mockApplication(

client: HttpClient,

...

)

`

That way configuration of your client is decoupled from the configuration of your test server.

Hope that helps!

--

--

Alexey Soshin
Alexey Soshin

Written by Alexey Soshin

Solutions Architect @Depop, author of “Kotlin Design Patterns and Best Practices” book and “Pragmatic System Design” course

No responses yet