mensahs / mockito

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

Multiple argument matchers within the same test method causing issue. #505

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I have 2 argument matchers within the same test method. 
And i have 'when...thenAnswer' construct being used twice in the method. When 
the second construct is reached, it goes within the match method of the first 
argument matcher and  shows the object as null. Both the argument matchers are 
on the same object. This problem occurs even before the actual method to be 
tested is called.Even when i changed the construct to 'when...thenReturn' the 
same issue occured.
mockito version - 1.9.5  mockito-core-1.9.5.jar

----------
Please create new tickets in [https://github.com/mockito/mockito/issues/new
GitHub]

Include steps to reproduce, expected output, version used.
----------

Original issue reported on code.google.com by kapatpr...@gmail.com on 22 Feb 2015 at 7:11

GoogleCodeExporter commented 8 years ago
Hi,

This seems like a misuse, please ask the mailing list for advice 
http://groups.google.com/group/mockito
Also a code snippet would be more useful.

Cheers,

Original comment by brice.du...@gmail.com on 24 Feb 2015 at 4:19

GoogleCodeExporter commented 8 years ago
Hi,

This seems like a misuse, please ask the mailing list for advice 
http://groups.google.com/group/mockito
Also a code snippet would be more useful.

Cheers,

Original comment by brice.du...@gmail.com on 24 Feb 2015 at 4:19