Skip to content

Conversation

@dennisdoomen
Copy link
Member

@dennisdoomen dennisdoomen commented Mar 17, 2024

Ensured that nested assertion scopes produce a nested context. So the statement

using var outerScope = new AssertionScope("outer");
using var innerScope = new AssertionScope("inner");

Results in a {context} as used in FailWith that contains outer/inner.

This should help #2597 produce a nicer message.

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.

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 Mar 17, 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

@dennisdoomen dennisdoomen force-pushed the fix/nestedassertionscopes branch 4 times, most recently from 491cf8a to 5d87fdf Compare March 17, 2024 20:04
@dennisdoomen dennisdoomen marked this pull request as ready for review March 17, 2024 20:07
@coveralls
Copy link

coveralls commented Mar 17, 2024

Pull Request Test Coverage Report for Build 8349307676

Details

  • 14 of 14 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.555%

Totals Coverage Status
Change from base Build 8346925366: 0.0%
Covered Lines: 11996
Relevant Lines: 12180

💛 - Coveralls

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
@dennisdoomen dennisdoomen force-pushed the fix/nestedassertionscopes branch from 5d87fdf to c5c777d Compare March 19, 2024 19:57
@dennisdoomen dennisdoomen requested a review from jnyrup March 19, 2024 19:57
@dennisdoomen dennisdoomen merged commit e760ba4 into fluentassertions:develop Mar 20, 2024
@dennisdoomen dennisdoomen deleted the fix/nestedassertionscopes branch March 20, 2024 15:52
@jnyrup jnyrup changed the title Allow nested AssertionScopes to chain their context Allow nested AssertionScopes to chain their context May 30, 2024
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
…assertions#2607)

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
…assertions#2607)

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
…assertions#2607)

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 18, 2024
…assertions#2607)

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 18, 2024
…assertions#2607)

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 24, 2024
…assertions#2607)

Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
jnyrup pushed a commit that referenced this pull request Sep 9, 2024
Also fixed an inconsistency in which one overload of the assertion scope constructor would not actually affect AssertionScope.Current.
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.

3 participants