https://kotlinlang.org logo
#kotlin-fuel
Title
# kotlin-fuel
e

Emil Kantis

02/04/2021, 8:18 AM
Does anyone have recommendations on testing code that depends on Fuel? E.g. I have a client that makes some requests and currently it just calls
url.httpPost()
for instance, but I would like to somehow validate the requests that are made
Perhaps there's some interface that could be mocked and injected into the client, to make requests as
<http://httpClient.post|httpClient.post>(url, params...)
instead? (which could be verified on the mock)
d

Derk-Jan Karrenbeld

02/05/2021, 3:18 AM
Fuel has a test suite that also mocks the calls. You can take inspiration from there 🙂
1
e

Emil Kantis

02/06/2021, 11:12 AM
Thanks, I'll try that 🙂
7 Views