|
From: beRt b. <beR...@al...> - 2005-01-07 13:28:08
|
> So we could use a recursive for-in check to validate this method > correctly if test is made on object datatype. I don't fully agree. What about defining an interface Comparable that has a method equals() in it? If you want to define your own definition of equals(), you simply implement Comparable. assertEquals should then check if the object is an instance of Comparable, and if so, call equals(). Else it could take your approach. Anyway, I would like it a lot if assertEquals() could at least make a message using the toString() methods of both objects instead of an empty message when the test fails... Kind regards, Bert Bruynooghe. |