Skip to content
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

Fix support for write-only properties in BeEquivalentTo #2836

Merged

Conversation

dennisdoomen
Copy link
Member

@dennisdoomen dennisdoomen commented Nov 23, 2024

Fixes #2832

The implementation of Type.GetProperties that Reflectify provided crashed on a write-only property that is part of an interface. We didn't have a test for that, and the only other test that covered a similar scenario wasn't properly implemented.

Note Needs to rebased when #2835 is merged.

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • 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.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

Copy link

github-actions bot commented Nov 23, 2024

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@dennisdoomen dennisdoomen force-pushed the fix/write-only-properties branch 3 times, most recently from 7b3f5f3 to bc59834 Compare November 24, 2024 11:56
@dennisdoomen dennisdoomen marked this pull request as ready for review November 24, 2024 11:57
@coveralls
Copy link

coveralls commented Nov 24, 2024

Pull Request Test Coverage Report for Build 12005351325

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 97.365%

Totals Coverage Status
Change from base Build 12005343084: 0.001%
Covered Lines: 12933
Relevant Lines: 13169

💛 - Coveralls

@jnyrup
Copy link
Member

jnyrup commented Nov 24, 2024

I'll try to have a look today.

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Nov 24, 2024

Is it intentional that this PR also contains the "Drop support..." commit?

@dennisdoomen
Copy link
Member Author

Is it intentional that this PR also contains the "Drop support..." commit?

Yes, it needs to rebased when #2835 is merged.

Copy link
Member

@jnyrup jnyrup left a comment

Choose a reason for hiding this comment

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

Found a small typo.

I tried reproducing the reported bug in #2832 locally to see what caused the problems, but didn't finished. Will continue later tonight

docs/_pages/releases.md Outdated Show resolved Hide resolved
…ause a NRE.

The implementation of Type.GetProperties that Reflectify provided crashed on a write-only property that is part of an interface. We didn't have a test for that, and the only other test that covered a similar scenario wasn't properly implemented.
@dennisdoomen dennisdoomen merged commit b489c53 into fluentassertions:master Nov 25, 2024
5 checks passed
@dennisdoomen dennisdoomen deleted the fix/write-only-properties branch November 25, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants