vijayjcp / powermock

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

Mockito 1.10.x ArgumentCaptor does not work with multi-argument constructor #521

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
With a project using Mockito 1.10.8, mock a multi-argument constructor using an 
ArgumentCaptor and then verify the captured value. I've recreated the problem 
using this simple project:

https://github.com/jrh3k5/powermock-mockito-0.10.x-argument-captor

I know that PowerMock 1.5.6 isn't validated/built against Mockito 1.10.8, but, 
given that I'm not likely the only one excited to not be on a version of 
Mockito that's over 2 years old, I thought this should be something on the 
radar for an eventual uplift to a newer version of Mockito.

Original issue reported on code.google.com by jrh...@gmail.com on 14 Oct 2014 at 1:32

GoogleCodeExporter commented 8 years ago
I think this has been fixed in master. Please try to build powermock from 
source (mvn clean install -Dmaven.javadoc.skip=true) . It would be really nice 
if you wanted to try it out.

Original comment by johan.ha...@gmail.com on 13 Nov 2014 at 1:57

GoogleCodeExporter commented 8 years ago
Got a full day today, but I'll try to get around to this within the next week, 
if that fits within your timeline.

Original comment by jrh...@gmail.com on 13 Nov 2014 at 3:19

GoogleCodeExporter commented 8 years ago
Hmm. I tried it (I think) correctly. I installed using Java 8, update 25 and 
tried updating my example project, but I'm still getting a test failure.

I've pushed the POM changes to include 1.5.7-SNAPSHOT of PowerMock and the 
Mockito module:

https://github.com/jrh3k5/powermock-mockito-0.10.x-argument-captor

Original comment by jrh...@gmail.com on 26 Nov 2014 at 12:53