Skip to content

Migrate Microsoft.DotNet.TemplateLocator.Tests to MSTest.Sdk on MTP - #54895

Merged
Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:evangelink/mstest-mtp-templatelocator-tests
Jun 22, 2026
Merged

Evangelink merged 1 commit into
dotnet:mainfrom
Evangelink:evangelink/mstest-mtp-templatelocator-tests

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Part of the ongoing xUnit -> MSTest.Sdk (MTP) test migration. Migrates Microsoft.DotNet.TemplateLocator.Tests to MSTest.Sdk on Microsoft.Testing.Platform, following the same pattern as the other migration PRs (builds on the foundation from #54845).

  • Microsoft.NET.Sdk -> MSTest.Sdk; Microsoft.NET.TestFramework project reference -> Microsoft.NET.TestFramework.MSTest; removed OutputType=Exe; added the Microsoft.NET.TestFramework global using.
  • [Fact] -> [TestMethod], [TestClass] added; removed the ITestOutputHelper constructor injection (base SdkTest is now parameterless).

Builds clean for the SDK target framework.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 19, 2026 18:23

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

Migrates Microsoft.DotNet.TemplateLocator.Tests from the repo’s xUnit-based test setup to MSTest.Sdk running on Microsoft.Testing.Platform (MTP), aligning it with the ongoing test framework migration across dotnet/sdk.

Changes:

  • Switched the test project SDK to MSTest.Sdk, updated the test framework reference to Microsoft.NET.TestFramework.MSTest, and removed the xUnit-era OutputType=Exe customization.
  • Converted tests from xUnit attributes ([Fact]) to MSTest attributes ([TestClass] / [TestMethod]).
  • Updated the test class to use the parameterless MSTest SdkTest base (removed ITestOutputHelper constructor injection).
Show a summary per file
File Description
test/Microsoft.DotNet.TemplateLocator.Tests/Microsoft.DotNet.TemplateLocator.Tests.csproj Migrates the project to MSTest.Sdk/MTP and updates test framework wiring + global using.
test/Microsoft.DotNet.TemplateLocator.Tests/GivenAnTemplateLocator.cs Converts the test class and methods from xUnit to MSTest and removes xUnit logger injection.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

@Evangelink

Copy link
Copy Markdown
Member Author

/ba-g #54819

@Evangelink
Evangelink merged commit 286f902 into dotnet:main Jun 22, 2026
25 of 27 checks passed
@Evangelink
Evangelink deleted the evangelink/mstest-mtp-templatelocator-tests branch June 22, 2026 16:44
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 24, 2026
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