Use Combinatorial.MSTest for boolean DataRow tests in Microsoft.NET.Publish.Tests - #55013
Draft
Evangelink wants to merge 1 commit into
Draft
Use Combinatorial.MSTest for boolean DataRow tests in Microsoft.NET.Publish.Tests#55013Evangelink wants to merge 1 commit into
Evangelink wants to merge 1 commit into
Conversation
…ublish.Tests Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In
Microsoft.NET.Publish.Tests, replace full boolean cartesian-product[DataRow]sets with[CombinatorialData]from the Combinatorial.MSTest package.What changed
[DataRow(true)]/[DataRow(false)](or multi-bool combinations like[DataRow(false, false)]…[DataRow(true, true)]) replaced by a single[CombinatorialData]attribute.[CombinatorialData]automatically generates all combinations of the boolean parameters.Microsoft.NET.Publish.Tests.csprojgains anItemGroupwith:<PackageReference Include="Combinatorial.MSTest" />(version controlled centrally viaDirectory.Packages.props)<Using Include="Combinatorial.MSTest" />(global using so no per-fileusingdirectives 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