praveen1503 / powermock

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

Easymock API replayAll/verifyAll problem #394

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create EasyMock mock object
2. Expect call and set return value
3. Call replayAll()
4. Call the mock object
5. Call verifyAll()
6. Easymock object has not been replayed or verified

What is the expected output? What do you see instead?
Both tests should work, one fails.

What version of the product are you using? On what operating system?
Linux, Easymock 3.0, Powermock 1.4.12, Java 1.7.0_04-b20

Please provide any additional information below.
It works fine when easymock replay()/verify() are used.

Original issue reported on code.google.com by r...@kryo.se on 15 Jun 2012 at 1:36

Attachments:

GoogleCodeExporter commented 8 years ago
This shouldn't work and it's documented as well. You need to create the mock 
using the PowerMock API otherwise PowerMock doesn't know about it. An 
alternative is to pass the instance to the replayAll method. This is all in the 
docs.

Original comment by johan.ha...@gmail.com on 13 Jul 2012 at 7:06