Skip to content

Conversation

@IT-VBFK
Copy link
Contributor

@IT-VBFK IT-VBFK commented Oct 20, 2023

Fixes #2395

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 Oct 20, 2023

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

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.2.8
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coveralls
Copy link

coveralls commented Oct 20, 2023

Pull Request Test Coverage Report for Build 6598141855

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 97.414%

Totals Coverage Status
Change from base Build 6598038247: 0.01%
Covered Lines: 11669
Relevant Lines: 11858

💛 - Coveralls

@IT-VBFK IT-VBFK marked this pull request as ready for review October 20, 2023 15:22
@IT-VBFK IT-VBFK changed the title SAVEPOINT Do not continue asserting on the concrete exception type when the exception is null Oct 20, 2023
@IT-VBFK
Copy link
Contributor Author

IT-VBFK commented Oct 20, 2023

Out of curiosity: Why is the assertion class for synchronous functions called DelegateAssertions and for asynchronous functions AsyncFunctionAssertions?
And why do the FunctionAssertions exist? This class (on first glance) does nothing special compared to DelegateAssertions.

What about aligning them with naming (and inheritance hierarchy respectively)?

@jnyrup
Copy link
Member

jnyrup commented Oct 20, 2023

Out of curiosity: Why is the assertion class for synchronous functions called DelegateAssertions and for asynchronous functions AsyncFunctionAssertions? And why do the FunctionAssertions exist? This class (on first glance) does nothing special compared to DelegateAssertions.

I think it boils down to compatibility and avoiding/minimizing breaking changes.

What about aligning them with naming (and inheritance hierarchy respectively)?

What would the benefits be contra what breaking changes it would bring?

@IT-VBFK
Copy link
Contributor Author

IT-VBFK commented Oct 20, 2023

What would the benefits be contra what breaking changes it would bring?

I don't know :) Was just curious about it.

@dennisdoomen
Copy link
Member

Out of curiosity: Why is the assertion class for synchronous functions called DelegateAssertions and for asynchronous functions AsyncFunctionAssertions?

Because delegate is a good name to represent both Action and Func

And why do the FunctionAssertions exist? This class (on first glance) does nothing special compared to DelegateAssertions.

It probably could be moved to the base-class, but it doesn't hurt.

@IT-VBFK IT-VBFK force-pushed the fix/issue-2395 branch 2 times, most recently from 22819bb to 3ac1594 Compare October 21, 2023 15:01
@IT-VBFK IT-VBFK requested a review from dennisdoomen October 21, 2023 15:03
IT-VBFK and others added 2 commits October 21, 2023 17:14
Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
@dennisdoomen dennisdoomen merged commit 0ae4aa3 into fluentassertions:develop Oct 22, 2023
@IT-VBFK IT-VBFK deleted the fix/issue-2395 branch October 22, 2023 07:28
@jnyrup jnyrup added the bug label Oct 27, 2023
jnyrup added a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
…eption is `null` (fluentassertions#2398)

* Improved the failure message for `ThrowExactly[Async]`

* Add release notes

Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>

---------

Co-authored-by: IT-VBFK <it@voecklabrucker-freikriche.at>
Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
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.

Extra message when in AssertionScope using ThrowExactly

4 participants