无法解析符号 PowerMockRunner
2022-09-01 01:16:16
我第一次尝试使用Powermock
我使用build.gradle并添加了:
dependencies {
...
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'org.powermock:powermock-api-mockito:1.5.5'
}
现在我看看我的测试类,它有:
import org.junit.Before;
import org.junit.runner.RunWith;
import org.mockito.Matchers;
import org.powermock.core.classloader.annotations.PrepareForTest;
@RunWith(PowerMockRunner.class)
@PrepareForTest(GeoUtils.class)
并得到这个错误:
@RunWith(PowerMockRunner.class)
^
cannot resolve symbol PowerMockRunner
为什么它解决了而不是?PrepareForTest
PowerMockRunner