Perform order independent equality checks for built in types
dupdob opened this issue · 0 comments
dupdob commented
Currently (V2.6), NFluent performs per item equality checks for enumerations. This may not be the most suitable logic, as order does not make sense for some types, such as dictionaries.
There has been an explicit request to alter current behaviour so that some types are compared using more appropriate logic.
I opened this issue for people to voice their expectations and concerns about this change, as well as to establish which types should have their comparison logic changed.
Expected Behavior
- Dictionaries should be compared disregarding their order, but entry per entry
- Hashset should be compared disregarding their order
... to be completed
Current Behavior
Enumeration types are compared by comparing their content in order.
Possible Solution
Implement dedicated logic fro types listed above.
One case use IsEquivalentTo as a work around, but it is not recursive in V.2.6.0