From: <Vin...@ge...> - 2003-06-02 21:56:06
|
Hi, I noticed that the IsEqual constraint tests for equality by comparing the expected value against the actual value. IIRC it used to be the other way around with "static" mocks - i.e. expected.equals(actual) - so you could deal with legacy code not implementing equals correctly. It has helped me in a number of situtations. Any reason why this has changed? Extract from IsEqual : public boolean eval( Object arg ) { if(arg instanceof Object[]) { arg = Arrays.asList((Object[])arg); } return arg.equals(_object); } It could be _object.equals(arg) or am I missing something? Thanks, Vincent |