Thursday, 5 September 2013

Mockito and PowerMock dependency issues?

Mockito and PowerMock dependency issues?

What jars do I need to add to my pom.xml to get PowerMock working with
Mockito? I have the following dependencies:
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-support</artifactId>
<version>1.4.11</version>
<scope>test</scope>
</dependency>
But when I add the @PrepareForTest annotation at class level, Eclipse
cannot find it, but it can find PowerMockito. What jar am I missing?

No comments:

Post a Comment