Skip to content

Use Combinatorial.MSTest for boolean DataRow tests in Microsoft.DotNet.MSBuildSdkResolver.Tests - #55008

Closed
Evangelink wants to merge 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/combinatorial-msbuildsdkresolver-tests
Closed

Evangelink wants to merge 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/combinatorial-msbuildsdkresolver-tests

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Replace full boolean cartesian-product [DataRow] sets with [CombinatorialData] in the Microsoft.DotNet.MSBuildSdkResolver.Tests project.

What changed

  • 5 test methods in GivenAnMSBuildSdkResolver.cs had pairs of [DataRow(true)] / [DataRow(false)] replaced by a single [CombinatorialData] attribute. The executed test cases are identical — MSTest's combinatorial engine expands each bool parameter to true and false automatically.
  • Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj gains a new <ItemGroup> with:
    • <PackageReference Include="Combinatorial.MSTest" /> — picks up the version from the repo's central package management.
    • <Using Include="Combinatorial.MSTest" /> — makes [CombinatorialData] available globally in the project without an explicit using directive in each file.

Why

Enumerating every boolean combination by hand is noisy and error-prone. [CombinatorialData] expresses the same intent in one line and scales automatically if additional bool parameters are added later.

This is part of a per-project series applying the same mechanical refactor across the repo.

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

@github-actions

Copy link
Copy Markdown
Contributor

Due to lack of recent activity, this PR has been labeled as 'Stale'. It will be closed if no further activity occurs within 7 more days. Any new comment will remove the label.

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — 4956aff8 Deployed Aug 26, 2026 by Evangelink via pre_activation #1011
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.

2 participants