tiebin-zhang / powermock

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

Powermock 1.3.8 version does not work with EasyMock 3.0 #259

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Write any class with static method in it
2. Write the test case with jUnit4 (version 4.4)
3. Run the test

What is the expected output? What do you see instead?
Test should run, but instead it throw NoClassDefFoundException for
org.easymock.classextension.internal.ClassProxyFactory

What version of the product are you using? On what operating system?
1.3.8 on Windows

Please provide any additional information below.

Original issue reported on code.google.com by ravisukh...@gmail.com on 13 May 2010 at 6:13

GoogleCodeExporter commented 9 years ago
It didn't work in 1.3.7 either. This is because EasyMock has changed stuff 
internally 
which has forced PowerMock to change as well. If you're using an older version 
of 
EasyMock you need to change to an older version of PowerMock (1.3.5) or upgrade 
to 
EasyMock 2.5.2. 

It should probably be written in the FAQ.

Original comment by johan.ha...@gmail.com on 14 May 2010 at 10:21

GoogleCodeExporter commented 9 years ago
He is saying that he is using a newer version of EasyMock, not an older one. I 
have the same issue and I actually have to downgrade to EasyMock 2.5.2 to use 
PowerMock. 

In EasyMock 3.0 the ClassProxyFactory$MockMethodInterceptor class (and others 
that used to be in the now deprecated extentions library) are now in the 
org.easymock.internal package (easymock-3.0.jar) where as in 2.5 they in 
org.easymock.classextension.internal (easymockclassextension-2.5.2.jar). This 
issue should probably be re-opened.

Original comment by chage...@gmail.com on 9 Jul 2010 at 1:57

GoogleCodeExporter commented 9 years ago
Sorry, I thought you referred to an older version of EasyMock. This must be 
supported in the next version.

Original comment by johan.ha...@gmail.com on 14 Jul 2010 at 12:15

GoogleCodeExporter commented 9 years ago

Original comment by johan.ha...@gmail.com on 14 Jul 2010 at 2:07