Skip to content

Conversation

@siewers
Copy link
Contributor

@siewers siewers commented Feb 29, 2024

Added support for Satisfy on ReferenceTypeAssertions allowing to use element inspectors as an alternative to using predicates on Match.

Example:

var myDto = new Dto { Name = "Some Name" };

myDto.Should().Satisfy<Dto>(dto => dto.Name.Should().Be("Some Name"));

Fixed #2516

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

@github-actions
Copy link

github-actions bot commented Feb 29, 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 qodana-support@jetbrains.com

@ITaluone
Copy link
Contributor

ITaluone commented Mar 1, 2024

Missing release notes?

@siewers
Copy link
Contributor Author

siewers commented Mar 1, 2024

I didn't add it to the release notes yet as I'm unsure what version this will be in.

@dennisdoomen I can see that we're at Alpha 3 now, but the release notes only contain Alpha 1. I've added the changes to the current section of the releases.md, but I think something might be wrong. Can you let me know if I need to change something?

@ITaluone
Copy link
Contributor

ITaluone commented Mar 1, 2024

I didn't add it to the release notes yet as I'm unsure what version this will be in.

I think while on develop for the next version it doesn't really matter

@siewers
Copy link
Contributor Author

siewers commented Mar 1, 2024

@ITaluone Alright, I added it the the most recent section. I guess it will be aligned when the final release goes out, however, it might be a bit confusing for people using the Alpha versions to see the release notes not reflecting the latest version.

@siewers
Copy link
Contributor Author

siewers commented Mar 1, 2024

@dennisdoomen @ITaluone I believe I've addressed all comments now.

@coveralls
Copy link

coveralls commented Mar 11, 2024

Pull Request Test Coverage Report for Build 9436657769

Details

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

Totals Coverage Status
Change from base Build 9428450907: 0.01%
Covered Lines: 12078
Relevant Lines: 12261

💛 - Coveralls

@dennisdoomen
Copy link
Member

I believe I've addressed all comments now.

Apparently not.

@ITaluone
Copy link
Contributor

@siewers Could you rebase to current develop and force push again?

@siewers siewers closed this Mar 17, 2024
@dennisdoomen
Copy link
Member

Did you close it on purpose?

@siewers
Copy link
Contributor Author

siewers commented Mar 17, 2024

Wow, no, I didn't... I don't know what happened.

@siewers siewers reopened this Mar 17, 2024
@siewers
Copy link
Contributor Author

siewers commented May 12, 2024

@dennisdoomen I see you approved this PR, but it's blocked by a couple of checks. Is there anything further on my part I need to take care of?

@IT-VBFK
Copy link
Contributor

IT-VBFK commented May 12, 2024

Rebase to current develop and force push

@github-actions
Copy link

github-actions bot commented May 14, 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 qodana-support@jetbrains.com

@ITaluone
Copy link
Contributor

@siewers To fix the current problems rebase again :)

@siewers
Copy link
Contributor Author

siewers commented May 23, 2024

I've rebased, and all checks are passing. Can we merge this?

@dennisdoomen
Copy link
Member

I've rebased, and all checks are passing. Can we merge this?

Waiting for a review from @jnyrup

@jnyrup jnyrup changed the title Add support for Satisfy on ReferenceTypeAssertions Add support for Satisfy on ReferenceTypeAssertions May 27, 2024
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.

Allow Should().Satisfy() on objects and not only collections

6 participants