Restore [CombinatorialData] in dotnet-watch.Tests using Combinatorial.MSTest#54944
Merged
Merged
Conversation
….MSTest Follow-up to #54903, which migrated dotnet-watch.Tests to MSTest and as an unwanted side effect replaced every [CombinatorialData] test with hand-expanded [DataRow(...)] lists. Restore the combinatorial style using the MSTest-native Combinatorial.MSTest package (already used by test/dotnet.Tests), keeping the [TestMethod] attribute and all other MSTest migration changes intact. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores combinatorial test coverage in dotnet-watch.Tests after its xUnit → MSTest.Sdk migration by reintroducing [CombinatorialData]-style parameterization using Combinatorial.MSTest (centrally versioned), replacing verbose hand-expanded [DataRow(...)] lists.
Changes:
- Add
Combinatorial.MSTestpackage + globalUsingtodotnet-watch.Tests.csproj. - Convert affected MSTest
[TestMethod]tests back to[TestMethod, CombinatorialData], using[CombinatorialValues]/[CombinatorialRange]where appropriate. - Preserve existing
[Ignore]/[OSCondition]behavior while restoring combinatorial parameter spaces.
Show a summary per file
| File | Description |
|---|---|
| test/dotnet-watch.Tests/dotnet-watch.Tests.csproj | Adds Combinatorial.MSTest reference and global Using so combinatorial attributes are available project-wide. |
| test/dotnet-watch.Tests/Browser/BrowserRefreshServerTests.cs | Restores combinatorial coverage for LogLevel × enableHotReload. |
| test/dotnet-watch.Tests/Build/EvaluationTests.cs | Restores combinatorial coverage for static assets and target framework selection scenarios. |
| test/dotnet-watch.Tests/CommandLine/CommandLineOptionsTests.cs | Replaces expanded DataRows with combinatorial value sets for options/positions. |
| test/dotnet-watch.Tests/CommandLine/LaunchSettingsTests.cs | Restores combinatorial boolean coverage for launch profile environment variable behaviors. |
| test/dotnet-watch.Tests/FileWatcher/FileWatcherTests.cs | Restores combinatorial coverage across polling/nesting/subdirectory watcher permutations. |
| test/dotnet-watch.Tests/HotReload/AutoRestartTests.cs | Restores combinatorial coverage for interactive/non-interactive restart flows (including ignored test). |
| test/dotnet-watch.Tests/HotReload/BuildParametersSelectionPromptTests.cs | Uses [CombinatorialRange] to cover selection indices without enumerating [DataRow]. |
| test/dotnet-watch.Tests/HotReload/BuildProjectsTests.cs | Restores combinatorial boolean coverage for file-based app build behaviors. |
| test/dotnet-watch.Tests/HotReload/FileExclusionTests.cs | Restores full combinatorial coverage for exclusion permutations (existing/included/kind). |
| test/dotnet-watch.Tests/HotReload/MauiHotReloadTests.cs | Restores combinatorial boolean coverage while keeping OS gating + ignore. |
| test/dotnet-watch.Tests/HotReload/MetadataUpdateHandlerTests.cs | Restores combinatorial boolean coverage for verbose/non-verbose exception behavior. |
| test/dotnet-watch.Tests/HotReload/ProjectUpdateTests.cs | Restores combinatorial boolean coverage for Directory.Build.props vs normal project update. |
| test/dotnet-watch.Tests/HotReload/RuntimeProcessLauncherTests.cs | Restores combinatorial coverage for trigger/update-location enums and boolean shared output. |
Copilot's findings
- Files reviewed: 14/14 changed files
- Comments generated: 0
21207bc to
6adac3c
Compare
30a8d3a to
b6b176b
Compare
Member
Author
|
/ba-g #54928 and some unrelated trimming issues |
tmat
approved these changes
Jun 24, 2026
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.
Follow-up to #54903.
That PR migrated
dotnet-watch.Testsfrom xUnit to MSTest.Sdk (MTP). As an unwanted side effect, it removed the use of combinatorial test data — every[CombinatorialData]method was replaced with hand-expanded[DataRow(...)]lists, which are verbose and easy to get out of sync with the parameter space.This PR restores the combinatorial style using
Combinatorial.MSTest— the MSTest-native port whose attribute surface ([CombinatorialData],[CombinatorialValues],[CombinatorialRange]) matchesXunit.Combinatorial. This is the same package already consumed bytest/dotnet.Tests, and its version flows through central package management (eng/dependabot/Packages.props). The xUnitXunit.Combinatorialpackage is left untouched (still used by other projects).Changes
dotnet-watch.Tests.csproj: addCombinatorial.MSTestPackageReferenceand theCombinatorial.MSTestglobalUsing.[TestMethod]+ explicit[DataRow(...)]lists to[TestMethod, CombinatorialData], restoring[CombinatorialValues(...)]/[CombinatorialRange(...)]parameter attributes where needed and preserving[Ignore]/[OSCondition]:All other MSTest migration changes from #54903 (the
[TestMethod]attribute, MSTest assertions, lifecycle, etc.) are kept intact. Methods that originally used[InlineData](now legitimately[DataRow]) are left unchanged.Validation
dotnet build test/dotnet-watch.Tests/dotnet-watch.Tests.csproj— Build succeeded, 0 warnings, 0 errors.