https://kotlinlang.org logo
#coroutines
Title
# coroutines
h

Henning B

06/08/2021, 1:14 PM
Question about unit tests. I got a repo which I would like to test. It has an ApiService dependency which I mock with mockk. I would like to test, that when I call a suspending function of the repo it calls a certain api function on the correct dispatcher. I know how to verify the api call but have no idea how to make sure the correct dispatcher is used. Is this possible?
6 Views