【发布时间】:2020-09-22 14:46:18
【问题描述】:
我正在尝试使用 spek 框架编写一些单元测试,但在尝试访问代码中的 Looper (Looper.getMyLooper()) 时,一直遇到 RuntimeException (Method threw 'java.lang.RuntimeException exception. Stub!)。
我正在使用 Rx 提供的 TestScheduler 作为调度程序,并尝试了 @RunWith(AndroidJUnit4::class) 以及 @RunWith(RobolectricTestRunner::class)
任何指针?
【问题讨论】:
标签: android unit-testing spek