How to inject the coroutines Dispatchers into your testable code
Best practices for coroutines say that you should always inject the coroutines Dispatchers. It will allow you to control your Dispatchers during your tests. You can read more on the official Android Guidelines. https://developer.android.com/kotlin/coroutines/coroutines-best-practices#inject-dispatchers I will show you my approach to this problem, and how I solve it. There...