freepascal / mockito

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

when trying to mock equals - the exception is confusing #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. mock an equals method

What is the expected output? What do you see instead?
Expected (provided mockito still cannot mock equals) is an exception
'cannot mock equals and hashcode methods exception', and it is 
org.mockito.exceptions.misusing.InvalidUseOfMatchersException: 
Misplaced argument matcher detected!
Somewhere before this line you probably misused Mockito argument matchers.

which is the same as with other matcher problems....

What version of the product are you using? On what operating system?
mockito-all-1.7.jar, Vista

Please provide any additional information below.

Original issue reported on code.google.com by kretesen...@gmail.com on 6 Mar 2009 at 10:48

GoogleCodeExporter commented 9 years ago
Thanks, I'll look at it

Original comment by szcze...@gmail.com on 27 Mar 2009 at 1:02

GoogleCodeExporter commented 9 years ago
In trunk I changed exception messages to mention equals() & hashcode() along 
other
unmockable methods.

I'm creating a separate feature request to make verify() detect equals() & 
hashcode()
- unfortunately we cannot have it for when()

Original comment by szcze...@gmail.com on 19 Apr 2009 at 8:56

GoogleCodeExporter commented 9 years ago

Original comment by szcze...@gmail.com on 9 Jun 2009 at 3:15