on 2018 Jun 25 10:56 AM
Hi all,
I´m having trouble setting up setting up Powermock for Mockito.
I am using the Mockito version 1.9.5
JUnit version is 4.12
Therefore I´m using Powermock 1.5.6 (according to this guide).
Those are the Maven dependencies I used:
<properties>
<powermock.version>1.5.6</powermock.version>
</properties>
<dependencies>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4-legacy</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-support</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
When building the Project everything seems to be fine and the following .jars where downloaded:
powermock-api-mockito-1.5.6.jar
powermock-api-support-1.5.6.jar
powermock-module-junit4-legacy-1.5.6.jar
Using the @ RunWith(PowerMockRunner.class) - annotation Intellij says, that there where "Incompatible types found."
My IDE is not able to resolve the annotation @ PrepareForTest. According to this example the .class file should be located inside of "org.powermock.core.classloader.annotations", but for me there just is no "core"-directory.
Any Ideas on how to get the setup right?
Any help is appreciated.
Thanks in advance !
Request clarification before answering.
Hi Raphael,
I'd say that this is more of a Stack OverFlow question, and you might have more luck getting an answer on there.
Regards,
Luke
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.