|
From: Nat P. <nat...@gm...> - 2006-03-16 11:19:21
|
At the moment, lists (ArrayList, etc.) and other collections are compared for equality by reference, not by the value of their elements. It's a hangover from the port from Java, because Java defines equals for collections to do the expected thing. Feedback from users where I work shows that this is confusing when setting expectations with a parameter that is a list of expected values. So, I was going to add a special case in the EqualMatcher for objects that implement ICollection. Can anybody think of a reason not to? --Nat. |