Skip to content

Conversation

@nycdotnet
Copy link
Contributor

@nycdotnet nycdotnet commented Sep 25, 2022

PR for #1997 . I think it would also be good to have this exact error message in the docs somewhere with a little explainer, so I added that.

Todo:

  • PropertyInfoSelectorAssertions
  • TypeSelectorAssertions
  • Fix warning pragma based on feedback
  • Address this comment
  • GenericCollectionAssertions (see this comment on original issue)
  • Doc tweaks to try to make new errors appear on search engines.
  • Release notes

IMPORTANT

  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh. 🚫
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.

#pragma warning restore CA1065

/// <inheritdoc/>
public override int GetHashCode() => base.GetHashCode();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The configured linting rules were upset that I overrode Equals without also overriding GetHashCode().

@coveralls
Copy link

coveralls commented Sep 25, 2022

Pull Request Test Coverage Report for Build 3222617057

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 96.657%

Totals Coverage Status
Change from base Build 3054928487: 0.001%
Covered Lines: 12357
Relevant Lines: 12622

💛 - Coveralls

@jnyrup
Copy link
Member

jnyrup commented Sep 25, 2022

Just wanted to see if this is the right idea. If this looks good, I will go through the rest of the corresponding errors

It looks good 👍

Note: The decrease in code coverage is because Guarding_equals_throws uses ObjectAssertions to exercise the abstract ReferenceTypeAssertions.
You can just add another deriving class to ClassesWithGuardEquals.

@dennisdoomen
Copy link
Member

What a nice PR. I especially love the positive comments from @nycdotnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants