kotlin - 在 Kotlin 中使用不同的 RunWith 编写测试
问题描述
我有一堂课,其中一批测试需要@RunWith(RobolectricTestRunner::class)
,而另一个需要@RunWith(PowerMockRunner::class)
。我没有任何同时需要两者的测试。
我不愿意同时使用两者,因为我正在使用该库'org.powermock:powermock-module-junit4-rule-agent
并且我不想将其替换为 powermock-module-junit4-rule
有什么好的方法吗?
解决方案
推荐阅读
- c# - 只跳一次,直到角色落地
- r - 将拆分函数应用于矩阵的重叠行
- adapter - 短语适配器/连接器是什么意思?
- tensorflow - 如何使用 tensorflow 服务使 tensorflow hub 嵌入可服务?
- python - 如何在不引用键的情况下转储类似 json 的字符串?
- java - 如何调用在主方法的许多子类中定义的一种方法 toString() 来显示多态性
- html - 响应式对齐图像
- python - 使用 keras VGGFace 框架训练 CNN 时,Epoch 未启动
- c# - 在 ASP.NET Core SignalR 中,如何将消息从服务器发送到客户端?
- python - python:为名称存储在变量中的变量赋值