hi anyone knows the equivalente of `on` on Mockito...
# mockk
a
hi anyone knows the equivalente of
on
on Mockito but in MockK? I need to change the response type of an
every
call but I found no operator to do this as with the
on
operator in Mockito
e
there should be no need for it, what are you trying to do?
a
I need to mock a response from a Call<T> Retrofit call
the thing is that I when I call the method, it returns a Call<T> type and I need to return another type
e
I still don't understand what you're trying to do - even if it's a mock, whatever you return still has to be a Call<T> - and on() doesn't change that
but since you mentioned Retrofit - there's plenty of pre-built fake calls already, https://github.com/square/retrofit/blob/master/retrofit-mock/src/main/java/retrofit2/mock/Calls.java