Skip to content

Added PropertiesComparer - #4436

Merged
OsirisTerje merged 3 commits into
masterfrom
Issue4394_GeneralPropertyComparer
Jul 27, 2023
Merged

Added PropertiesComparer#4436
OsirisTerje merged 3 commits into
masterfrom
Issue4394_GeneralPropertyComparer

Conversation

@manfred-brands

Copy link
Copy Markdown
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.

@OsirisTerje OsirisTerje left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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