mid*_*ght 2 mockito kotlin-coroutines
我想模拟一个挂起函数以永远不返回任何结果。与此类似的是 的用法Single.never()。
是否可以?
我的团队通过一个suspendCancellableCoroutine从不调用的方法实现了这一点resume()。像这样的东西:
suspend fun never(): Nothing = suspendCancellableCoroutine { }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
805 次 |
| 最近记录: |