This post originated from an RSS feed registered with .NET Buzz
by Adrian Florea.
Original Post: Test Sharp (IsEqualsEquivalence)
Feed Title: Web Log di Adrian Florea
Feed URL: /error.aspx?aspxerrorpath=/adrian/Rss.aspx
Feed Description: "You know you've achieved perfection in design, not when you have nothing more to add, but when you have nothing more to take away." Antoine de Saint-Exupery
Equals definisce una relazione di equivalenza su un tipo Foo se e solo se, per ogni istanze non nulle x, y e z di Foo abbiamo:
x.Equals(x) è true;
se x.Equals(y) è true, anche y.Equals(x) è true;
se x.Equals(y) && y.Equals(z) è true, anche x.Equals(z) è true
Scrivete un'implementazione migliore (cioè che ritorni correttamente Fuzzy.True per più tipi; per questo il tipo di ritorno è Fuzzy e non bool) per il metodo IsEqualsEquivalence, rispetto a questa banale: