Skip to content

Use Combinatorial.MSTest for boolean DataRow tests in Microsoft.NET.Publish.Tests - #55013

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

Use Combinatorial.MSTest for boolean DataRow tests in Microsoft.NET.Publish.Tests#55013
Evangelink wants to merge 1 commit into
dotnet:mainfrom
Evangelink:dev/amauryleve/combinatorial-publish-tests

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

In Microsoft.NET.Publish.Tests, replace full boolean cartesian-product [DataRow] sets with [CombinatorialData] from the Combinatorial.MSTest package.

What changed

  • 10 test methods across 6 files had their explicit [DataRow(true)] / [DataRow(false)] (or multi-bool combinations like [DataRow(false, false)][DataRow(true, true)]) replaced by a single [CombinatorialData] attribute.
  • The executed test cases are identical[CombinatorialData] automatically generates all combinations of the boolean parameters.
  • Microsoft.NET.Publish.Tests.csproj gains an ItemGroup with:
    • <PackageReference Include="Combinatorial.MSTest" /> (version controlled centrally via Directory.Packages.props)
    • <Using Include="Combinatorial.MSTest" /> (global using so no per-file using directives needed)

Why

Explicit full boolean cartesian products are noise: they're tedious to write, easy to miss a combination, and harder to read. [CombinatorialData] expresses the intent directly and scales automatically when new parameters are added.

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

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

…ublish.Tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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