-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NUnit2010 - do not consider Equals call if it doesn't override Object.Equals #728
Comments
Agreed. If I guess there is a legacy reason |
I added a PR to exclude |
If there is a class Foo, implementing Equals in this way:
and Assert like:
NUnit2010 fix changes it to
But this test fails with error message:
Expected: Foo
But was: Foo
It would work, if Foo would implement public override bool Equals(object objectToCompare) instead. But this change is not possible for legacy code reason.
It would probably better, if the Analyzer would check, if the called Equals method is an override from object or just an isolated implementation and ignore it in such case.
The text was updated successfully, but these errors were encountered: