Skip to content

Document Assert.Scope() soft assertions and related behaviors#54409

Open
Evangelink wants to merge 2 commits into
dotnet:mainfrom
Evangelink:evangelink/document-assert-scope-soft-assertions
Open

Document Assert.Scope() soft assertions and related behaviors#54409
Evangelink wants to merge 2 commits into
dotnet:mainfrom
Evangelink:evangelink/document-assert-scope-soft-assertions

Conversation

@Evangelink

@Evangelink Evangelink commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

Documents the experimental Assert.Scope() soft-assertions API and its behaviors in the MSTest assertions article. This API previously had no coverage in dotnet/docs.

Added a new Soft assertions with Assert.Scope() section under The Assert class, covering:

This mirrors the design captured in MSTest RFC 011 (Soft Assertions and Nullability Design).

Related


Internal previews

📄 File 🔗 Preview link
docs/core/testing/unit-testing-mstest-writing-tests-assertions.md MSTest assertions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 16, 2026 14:07
@dotnetrepoman dotnetrepoman Bot added this to the June 2026 milestone Jun 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR documents the experimental Assert.Scope() soft-assertions API in the MSTest assertions article, explaining how failures are collected and reported at scope disposal, and calling out key behavioral differences from normal assertions.

Changes:

  • Added a new “Soft assertions with Assert.Scope()” section under The Assert class.
  • Documented disposal-time failure reporting behavior, postcondition limitations, and value-returning assertion behavior inside a scope.
  • Updated the article’s ms.date.
Show a summary per file
File Description
docs/core/testing/unit-testing-mstest-writing-tests-assertions.md Adds documentation for Assert.Scope() soft assertions, including experimental-status guidance and behavioral caveats.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 3

Comment thread docs/core/testing/unit-testing-mstest-writing-tests-assertions.md Outdated
Comment thread docs/core/testing/unit-testing-mstest-writing-tests-assertions.md Outdated
Comment thread docs/core/testing/unit-testing-mstest-writing-tests-assertions.md Outdated
…, unspaced em dashes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Evangelink

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

@Evangelink

Copy link
Copy Markdown
Member Author

Ping @gewarren

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants