The caption may sound a little weird. Allow me to elaborate using an example.
The Object.Equals
function usually requires that a.Equals(a)
returns true. Unless you're doing something twisted in your code, every class should adhere to this rule.
So we could write a generic unittest that checks all available classes to comply. (We might exclude classes explicitly marked by some attribute.)
And instead of just using Equals, we're also checking for correct behavior of all implementations of, say, IComparer and whatever standard interface you can imagine.
Now, my question is: Does this exist already? If not, why would it be a bad idea?