afaik, the problem the problem is because the scop...
# coroutines
p
afaik, the problem the problem is because the scoped used during the mocking is now different than the one used for the real call, therefor, the Continuation used is different. But I don't know how i can work around this problem.
m
Which mocking library are you using?
p
mockito-core and com.nhaarman:mockito-kotlin-kt1.1 extensions
m
I ran into this issue also, with the implicit continuation, but I couldn’t really find a viable solution. I’m considering Mockk which should support mocking suspending functions. Sorry, it’s not a very encouraging answer. In the meantime I create my mocks manually for classes with suspending members. Generally I end up redirecting the suspending call to non-suspending functions which I actually mock, that way I still get the benefit of Mockito’s fluent syntax.
d
You can include mockk alongside mockito and gradually migrate if you want...