将Powermock与Kotlin集成在一起进行仪器测试

时间:2019-07-07 19:17:43

标签: android kotlin powermock powermockito powermockrunner

我正在尝试将Powermock与Kotlin集成在一起,以使用Calendar和共享首选项来测试与日期相关的逻辑,但是我始终无法获得Powermock的引用,但模仿对象可以正常工作。

我尝试集成所有我能找到的与powermock相关的依赖项,但是没有任何作用

我已经包含在我的项目中的依赖项-

testImplementation "org.powermock:powermock-api-mockito2:2.0.0-beta.5"
testImplementation "org.powermock:powermock-module-junit4-rule-agent:2.0.0-beta.5"
testImplementation "org.powermock:powermock-module-junit4:2.0.0-beta.5"
testImplementation "io.kotlintest:kotlintest:2.0.5"
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.0.0-RC1"
testImplementation 'org.mockito:mockito-inline:2.11.0'
testImplementation "org.mockito:mockito-core:2.11.0"
androidTestImplementation "org.mockito:mockito-android:2.11.0"

我不确定我使用的是正确版本还是缺少某些依赖项。

0 个答案:

没有答案