Shankar
06/29/2020, 1:38 PMgetAccessToken(): String {
val token: String
//check token expiry...
runBlocking {
token = getToken()
}
return token
}
getToken(): String = suspendCoroutine { continuation->
//get the token from server and return it
continuation.resume(newToken)
}
I tried to mock the getToken() method, but the runBlocking{} block never gets called.Javier
06/29/2020, 2:35 PMEvan R.
06/29/2020, 3:05 PM