Skip to content

Added PropertiesComparer #4436

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

Merged
merged 3 commits into from
Jul 27, 2023
Merged

Conversation

manfred-brands
Copy link
Member

Fixes #4394

We constantly have to make special Validate methods or implement IEquatable on classes that should not be comparable.
However we want to be able to compare them in NUnit, e.g. to check if serialization roundtrips.

Copy link
Member

@OsirisTerje OsirisTerje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Could perhaps had an explicit test for the PropertiesComparer, but I do see that it is perhaps sufficiently covered by many of other tests.

@OsirisTerje OsirisTerje merged commit 4eea3ea into master Jul 27, 2023
@OsirisTerje OsirisTerje deleted the Issue4394_GeneralPropertyComparer branch July 27, 2023 20:02
@manfred-brands
Copy link
Member Author

Could perhaps had an explicit test for the PropertiesComparer

None of the other Comparers have their own tests ...
I did add a specific new test for a class that doesn't override Equals, which without this comparer fails and now passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand NUnitEquality to use Equality of all Properties
2 participants