dhamini-poornachandra / mockito

Automatically exported from code.google.com/p/mockito
0 stars 0 forks source link

Mockito verify not counting properly #315

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Mockito.verify(mockA, times(1)).methodOnA(mockB.methodOnB());

What is the expected output? What do you see instead?
The framework should count how many times mockA.methodOnA has been executed 
with argument mockB.methodOnB().

Instead, it is counting how many times mockB.methodOnB was called.

What version of the product are you using? On what operating system?
Mockito 8.1.2
Windows 7 Enterprise
MockitoJUnitRunner

Please provide any additional information below.

Original issue reported on code.google.com by enriquez...@gmail.com on 31 Jan 2012 at 7:35

GoogleCodeExporter commented 8 years ago
Hi, I can't reproduce your problem.

Can you craft a complete piece of code that actually show evidence of this 
problem ?
Also it seems you are using version 1.8.2. Make sure you are using one of the 
latest version.

Hope that helps.

Original comment by brice.du...@gmail.com on 1 Feb 2012 at 9:01

GoogleCodeExporter commented 8 years ago
I think it was fixed, please use the latest version :)

Original comment by szcze...@gmail.com on 1 Feb 2012 at 2:01

GoogleCodeExporter commented 8 years ago
Yes indeed, once I upgraded to 9.x it's fixed.

Thanks

Original comment by enriquez...@gmail.com on 1 Feb 2012 at 2:23

GoogleCodeExporter commented 8 years ago
Ok I'll mark the issue as invalid.

Original comment by brice.du...@gmail.com on 1 Feb 2012 at 2:43

GoogleCodeExporter commented 8 years ago
Well, the defect is still there, therefore I will still argue that this is an 
existent defect in this reported version (not invalid). Luckily my project was 
able to upgrade to 9.x.  Not sure how much support Mockitooffers to prior 
versions.
anyhow, thank you.

Original comment by enriquez...@gmail.com on 1 Feb 2012 at 2:51

GoogleCodeExporter commented 8 years ago
We create a newer version with bug fixes in the most iterative way. If version 
1.9.0 does not suit your project for whatever reason, the version 1.8.5 might 
suit your needs.

However you are right I'll mark it as duplicate of issue 138.

Original comment by brice.du...@gmail.com on 1 Feb 2012 at 3:06