nickylin / powermock

Automatically exported from code.google.com/p/powermock
Apache License 2.0
0 stars 0 forks source link

IllegalArgumentException in Eclipse but not with Maven #463

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Calling...

mockStatic(MySingleton.class);

...fails in Eclipse:

IllegalArgumentException: MySingleton is not an interface.

But Maven runs the test successfully.

Eclipse Juno Service Release 2
Maven 2.2.1
JUnit 4.8.2
EasyMock 3.2
PowerMock 1.5.1

Original issue reported on code.google.com by roool...@gmx.de on 1 Oct 2013 at 11:58

GoogleCodeExporter commented 9 years ago
Hi, I have the same issue too, any update now?

Original comment by lengerfu...@gmail.com on 22 Jul 2014 at 11:33

GoogleCodeExporter commented 9 years ago
Could it be a classpath issue? Make sure that Eclipse doesn't bring in it's own 
JUnit version that comes before the powermock junit module in classpath.

Original comment by johan.ha...@gmail.com on 23 Jul 2014 at 6:54