kingsley.gomes
02/18/2019, 3:36 PMfun sample() {
async {
val result = manager.someDbOperation().await()
withContext(Dispatchers.Main) {
callback.onResult(result)
}
}
And my test is as follows
fun test() {
Subject.sample()
Verify { runBlocking{
manager.someDbOperation()
callback.onResult()
}
}
It's unable to switch the thread to Main and says callback
was not called