Open GoogleCodeExporter opened 9 years ago
I have a similar issue. It seems to be a hamcrest version problem.
Original comment by tim.br...@gmail.com
on 11 Dec 2012 at 4:43
Yes Hamcrest versioning can be a nightmare if you have other projects in your
classpath that uses another version of Hamcrest. Unfortunately I don't think
PowerMock can do anything about this.
Original comment by johan.ha...@gmail.com
on 22 Jan 2013 at 7:27
I have the same issue, using powermock 1.4.12, junit 4.11 and mockito 1.9.0.
THis results in the following stacktrace:
java.lang.ClassCastException: org.junit.rules.ExpectedException cannot be cast
to org.junit.rules.MethodRule
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit47RunnerDelegateImpl$PowerMockJUnit47MethodRunner.executeTest(PowerMockJUnit47RunnerDelegateImpl.java:79)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$PowerMockJUnit44MethodRunner.runBeforesThenTestThenAfters(PowerMockJUnit44RunnerDelegateImpl.java:284)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:86)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.invokeTestMethod(PowerMockJUnit44RunnerDelegateImpl.java:209)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.runMethods(PowerMockJUnit44RunnerDelegateImpl.java:148)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl$1.run(PowerMockJUnit44RunnerDelegateImpl.java:122)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:33)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:45)
at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44RunnerDelegateImpl.run(PowerMockJUnit44RunnerDelegateImpl.java:120)
at org.powermock.modules.junit4.common.internal.impl.JUnit4TestSuiteChunkerImpl.run(JUnit4TestSuiteChunkerImpl.java:102)
at org.powermock.modules.junit4.common.internal.impl.AbstractCommonPowerMockRunner.run(AbstractCommonPowerMockRunner.java:53)
at org.powermock.modules.junit4.PowerMockRunner.run(PowerMockRunner.java:42)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
Original comment by sander.s...@jdriven.com
on 14 Mar 2013 at 9:47
Try latest trunk
Original comment by johan.ha...@gmail.com
on 15 Mar 2013 at 6:32
Original issue reported on code.google.com by
yvesdm
on 7 Dec 2012 at 1:46Attachments: