I'm trying to use Powermock for the first time
I use build.gradle and added:
dependencies {
...
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'org.powermock:powermock-api-mockito:1.5.5'
}
now I look at my test class which has:
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)
and get this error:
@RunWith(PowerMockRunner.class)
^
cannot resolve symbol PowerMockRunner
how come it resolves PrepareForTest
and not PowerMockRunner
?
PowerMockRunner
import as it did withPrepareForTest
. So I guess it cannot resolve its import anyhow. no?what is it?org.powermock.modules.junit4.PowerMockRunner
. If it doesn't accept the import, the dependency must not have been resolved for some reason.