cloud1105 / mockito

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

Non reflexive equals contracts confuses stubbing invocations #485

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The attached unit test currently fails against the tip of master.  I understand 
that having a non reflexive equals contract is counter to the JDK spec, but it 
puzzles me why we would be doing a non identity comparison here.  A naive 
change in InvocationMatcher to do == equality in matches(Invocation actual) 
makes this test pass, and all other tests seem to pass too.  I don't however 
know enough about Mockito internals to know if this will break something that 
is not covered by existing testing.

Original issue reported on code.google.com by chris.w....@gmail.com on 9 Apr 2014 at 5:13

Attachments: