July 2018
Intermediate to advanced
242 pages
8h 6m
English
In this recipe, we are going to explore how to effectively test code that uses coroutines internally. We are going to write a unit test for the part of a code that runs asynchronously in the background while trying to authorize the given user credentials using an external API. We are going to employ the Kotlin Mockito library to mock the calls to the external API and the TextCoroutineContext class, allowing us to test asynchronous code with ease.
Read now
Unlock full access