What steps will reproduce the problem?
run testng.xml (see attached files)
What is the expected output? What do you see instead?
expected:
Total tests run: 2, Failures: 0, Skips: 0
actual:
java.lang.AssertionError:
Expectation failure on verify:
ObjectToMock.setBeanName("objectToMock"): expected: 1, actual: 0
at org.easymock.internal.MocksControl.verify(MocksControl.java:226)
at org.powermock.api.easymock.internal.invocationcontrol.EasyMockMethodInvocationControl.verify(EasyMockMethodInvocationControl.java:120)
at org.powermock.api.easymock.PowerMock.verify(PowerMock.java:1650)
at org.powermock.api.easymock.PowerMock.verifyAll(PowerMock.java:1586)
at com.example.Test2.b(Test2.java:17)
Total tests run: 2, Failures: 1, Skips: 0
What version of the product are you using? On what operating system?
PowerMock 1.5.1
EasyMock 3.2
Spring 3.2.5
TestNG 6.8.7
Please provide any additional information below.
Not sure which side falls testng or spring or powermock.
It seams that PowerMock does not clean his own context.
Original issue reported on code.google.com by d...@ciklum.com on 14 Nov 2013 at 4:38
Original issue reported on code.google.com by
d...@ciklum.com
on 14 Nov 2013 at 4:38Attachments: