Skip to content

Update canonical spec unit test example from xUnit to MSTest - #55092

Merged
Evangelink merged 2 commits into
mainfrom
dev/amauryleve/super-train
Jul 1, 2026
Merged

Evangelink merged 2 commits into
mainfrom
dev/amauryleve/super-train

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

As part of the migration from xUnit to MSTest, this updates and cleans up the "Running unit tests" scenario in documentation/specs/canonical.md.

Changes

  • Narrative now references MSTest instead of xUnit.
  • Replaced dotnet new tests --type xunit with dotnet new mstest.
  • Rewrote the sample test to use MSTest APIs: [TestClass]/[TestMethod] and Assert.IsTrue, with the Microsoft.VisualStudio.TestTools.UnitTesting namespace (and dropped the now-unused System using).

The restore and dotnet test steps were already framework-agnostic and left unchanged.

Copilot AI review requested due to automatic review settings July 1, 2026 09:59

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

Updates the canonical CLI spec’s “Running unit tests” scenario to use MSTest instead of xUnit as part of the ongoing test framework migration.

Changes:

  • Narrative text now refers to MSTest rather than xUnit.
  • Replaces the example project creation command with dotnet new mstest.
  • Rewrites the sample test to MSTest attributes/assertions ([TestClass]/[TestMethod], Assert.IsTrue).
Show a summary per file
File Description
documentation/specs/canonical.md Updates the unit test walkthrough from xUnit to MSTest, including command and sample test code.

Copilot's findings

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

Comment thread documentation/specs/canonical.md Outdated
Comment on lines 228 to 231
/> dotnet new mstest
Created "tests" MSTest test project in "tests".

/tests>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch — fixed in 38c9fac. Added -o tests so the command matches the /tests> prompt that follows.

@Evangelink
Evangelink enabled auto-merge July 1, 2026 10:08
@Evangelink
Evangelink merged commit a224fd5 into main Jul 1, 2026
14 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/super-train branch July 1, 2026 10:11
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 6, 2026
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.

3 participants