diff --git a/test/dotnet.Tests/CommandTests/Publish/GivenDotnetPublishPublishesProjects.cs b/test/dotnet.Tests/CommandTests/Publish/GivenDotnetPublishPublishesProjects.cs index 85630f8e8374..c4983f5aeb07 100644 --- a/test/dotnet.Tests/CommandTests/Publish/GivenDotnetPublishPublishesProjects.cs +++ b/test/dotnet.Tests/CommandTests/Publish/GivenDotnetPublishPublishesProjects.cs @@ -346,8 +346,7 @@ public void ItFailsToPublishWithNoBuildIfNotPreviouslyBuilt() } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void ItPublishesSuccessfullyWithNoBuildIfPreviouslyBuilt(bool selfContained) { var testInstance = TestAssetsManager.CopyTestAsset("TestAppSimple", identifier: selfContained.ToString()) diff --git a/test/dotnet.Tests/CommandTests/Reference/Add/GivenDotnetAddReference.cs b/test/dotnet.Tests/CommandTests/Reference/Add/GivenDotnetAddReference.cs index 31a173ceb71f..d994a632ac1e 100644 --- a/test/dotnet.Tests/CommandTests/Reference/Add/GivenDotnetAddReference.cs +++ b/test/dotnet.Tests/CommandTests/Reference/Add/GivenDotnetAddReference.cs @@ -674,8 +674,7 @@ public void WhenFrameworkSwitchIsNotMatchingAnyOfTargetedFrameworksItPrintsError } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void WhenIncompatibleFrameworkDetectedItPrintsError(bool useFrameworkArg) { var setup = Setup(useFrameworkArg.ToString()); diff --git a/test/dotnet.Tests/CommandTests/Restore/GivenThatIWantToRestoreApp.cs b/test/dotnet.Tests/CommandTests/Restore/GivenThatIWantToRestoreApp.cs index 45bccf22a741..4626523b300d 100644 --- a/test/dotnet.Tests/CommandTests/Restore/GivenThatIWantToRestoreApp.cs +++ b/test/dotnet.Tests/CommandTests/Restore/GivenThatIWantToRestoreApp.cs @@ -15,8 +15,7 @@ public GivenThatIWantToRestoreApp() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void ItRestoresAppToSpecificDirectory(bool useStaticGraphEvaluation) { var rootPath = TestAssetsManager.CreateTestDirectory(identifier: useStaticGraphEvaluation.ToString()).Path; @@ -97,8 +96,7 @@ public void ItRestoresLibToSpecificDirectory(bool useStaticGraphEvaluation, stri } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void ItRestoresTestAppToSpecificDirectory(bool useStaticGraphEvaluation) { var rootPath = TestAssetsManager.CopyTestAsset("VSTestCore", identifier: useStaticGraphEvaluation.ToString()) @@ -123,8 +121,7 @@ public void ItRestoresTestAppToSpecificDirectory(bool useStaticGraphEvaluation) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void ItRestoresWithTheSpecifiedVerbosity(bool useStaticGraphEvaluation) { var rootPath = TestAssetsManager.CreateTestDirectory(identifier: useStaticGraphEvaluation.ToString()).Path; diff --git a/test/dotnet.Tests/CommandTests/Sdk/Check/GivenDotnetSdkCheck.cs b/test/dotnet.Tests/CommandTests/Sdk/Check/GivenDotnetSdkCheck.cs index 1f1bce351aa3..d171fe235dd9 100644 --- a/test/dotnet.Tests/CommandTests/Sdk/Check/GivenDotnetSdkCheck.cs +++ b/test/dotnet.Tests/CommandTests/Sdk/Check/GivenDotnetSdkCheck.cs @@ -46,8 +46,7 @@ public void WhenHelpOptionIsPassedItPrintsUsage(string helpArg) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void WhenNewFeatureBandExistsItIsAdvertised(bool newerBandExists) { var parseResult = Parser.Parse(new string[] { "dotnet", "sdk", "check" }); diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsArtifactPostProcessing.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsArtifactPostProcessing.cs index ee073366981b..db4f5e8d8939 100644 --- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsArtifactPostProcessing.cs +++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsArtifactPostProcessing.cs @@ -23,8 +23,7 @@ public GivenDotnetTestBuildsAndRunsArtifactPostProcessing() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void ArtifactPostProcessing_SolutionProjects(bool merge) { TestAsset testInstance = TestAssetsManager.CopyTestAsset("VSTestMultiProjectSolution", Guid.NewGuid().ToString()) @@ -47,8 +46,7 @@ public void ArtifactPostProcessing_SolutionProjects(bool merge) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void ArtifactPostProcessing_TestContainers(bool merge) { TestAsset testInstance = TestAssetsManager.CopyTestAsset("VSTestMultiProjectSolution", Guid.NewGuid().ToString()) @@ -76,8 +74,7 @@ public void ArtifactPostProcessing_TestContainers(bool merge) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void ArtifactPostProcessing_VSTest_TestContainers(bool merge) { TestAsset testInstance = TestAssetsManager.CopyTestAsset("VSTestMultiProjectSolution", Guid.NewGuid().ToString()) diff --git a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs index 1ed46fbda93c..6a991ff46f47 100644 --- a/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs +++ b/test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs @@ -100,8 +100,7 @@ public void RunProjectWithMultipleTFMs_ShouldReturnExitCodeGenericFailure(string } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void RunProjectWithMultipleTFMs_ParallelizationTest_RunInParallelShouldFail(bool testTfmsInParallel) { TestAsset testInstance = TestAssetsManager.CopyTestAsset("TestProjectWithMultipleTFMsParallelization", Guid.NewGuid().ToString()) diff --git a/test/dotnet.Tests/CommandTests/Workload/Clean/GivenDotnetWorkloadClean.cs b/test/dotnet.Tests/CommandTests/Workload/Clean/GivenDotnetWorkloadClean.cs index 8b15bebbb2ac..2c58c8d43146 100644 --- a/test/dotnet.Tests/CommandTests/Workload/Clean/GivenDotnetWorkloadClean.cs +++ b/test/dotnet.Tests/CommandTests/Workload/Clean/GivenDotnetWorkloadClean.cs @@ -45,10 +45,7 @@ public GivenDotnetWorkloadClean() } [TestMethod] - [DataRow(true, true)] - [DataRow(false, true)] - [DataRow(true, false)] - [DataRow(false, false)] + [CombinatorialData] public void GivenWorkloadCleanFileBasedItRemovesPacksAndPackRecords(bool userLocal, bool cleanAll) { var (testDirectory, dotnetRoot, userProfileDir, workloadResolver, nugetDownloader) = Setup(userLocal, cleanAll); @@ -76,8 +73,7 @@ public void GivenWorkloadCleanFileBasedItRemovesPacksAndPackRecords(bool userLoc } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenWorkloadCleanAllFileBasedItCleansAllFeatureBands(bool userLocal) { var (testDirectory, dotnetRoot, userProfileDir, workloadResolver, nugetDownloader) = Setup(userLocal, true); diff --git a/test/dotnet.Tests/CommandTests/Workload/Install/GivenDotnetWorkloadInstall.cs b/test/dotnet.Tests/CommandTests/Workload/Install/GivenDotnetWorkloadInstall.cs index c5c0d5458757..ad9670e3b6ca 100644 --- a/test/dotnet.Tests/CommandTests/Workload/Install/GivenDotnetWorkloadInstall.cs +++ b/test/dotnet.Tests/CommandTests/Workload/Install/GivenDotnetWorkloadInstall.cs @@ -345,8 +345,7 @@ public void GivenWorkloadInstallItErrorsOnUnsupportedPlatform() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenWorkloadInstallItDoesNotRemoveOldInstallsOnRollback(bool userLocal) { var testDirectory = TestAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; diff --git a/test/dotnet.Tests/CommandTests/Workload/Install/GivenWorkloadManifestUpdater.cs b/test/dotnet.Tests/CommandTests/Workload/Install/GivenWorkloadManifestUpdater.cs index 8f8d4553080c..838692192020 100644 --- a/test/dotnet.Tests/CommandTests/Workload/Install/GivenWorkloadManifestUpdater.cs +++ b/test/dotnet.Tests/CommandTests/Workload/Install/GivenWorkloadManifestUpdater.cs @@ -207,8 +207,7 @@ public void GivenAdvertisedManifestsItCalculatesCorrectUpdates() } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public async Task ItCanFallbackAndAdvertiseCorrectUpdate(bool useOfflineCache) { // Currently installed - 6.0.200 workload manifest @@ -285,8 +284,7 @@ public async Task ItCanFallbackAndAdvertiseCorrectUpdate(bool useOfflineCache) } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public async Task ItCanFallbackWithNoUpdates(bool useOfflineCache) { // Currently installed - none @@ -351,8 +349,7 @@ public async Task ItCanFallbackWithNoUpdates(bool useOfflineCache) } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public async Task GivenNoUpdatesAreAvailableAndNoRollbackItGivesAppropriateMessage(bool useOfflineCache) { // Currently installed - none diff --git a/test/dotnet.Tests/CommandTests/Workload/Repair/GivenDotnetWorkloadRepair.cs b/test/dotnet.Tests/CommandTests/Workload/Repair/GivenDotnetWorkloadRepair.cs index acd2dab7a256..ec647556bfae 100644 --- a/test/dotnet.Tests/CommandTests/Workload/Repair/GivenDotnetWorkloadRepair.cs +++ b/test/dotnet.Tests/CommandTests/Workload/Repair/GivenDotnetWorkloadRepair.cs @@ -31,8 +31,7 @@ public GivenDotnetWorkloadRepair() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenNoWorkloadsAreInstalledRepairIsNoOp(bool userLocal) { _reporter.Clear(); @@ -58,8 +57,7 @@ public void GivenNoWorkloadsAreInstalledRepairIsNoOp(bool userLocal) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenExtraPacksInstalledRepairGarbageCollects(bool userLocal) { var testDirectory = TestAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; @@ -108,8 +106,7 @@ public void GivenExtraPacksInstalledRepairGarbageCollects(bool userLocal) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenMissingPacksRepairFixesInstall(bool userLocal) { var testDirectory = TestAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; @@ -155,8 +152,7 @@ public void GivenMissingPacksRepairFixesInstall(bool userLocal) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenMissingManifestsInWorkloadSetModeRepairReinstallsManifests(bool userLocal) { var (dotnetRoot, userProfileDir, mockInstaller, workloadResolver, manifestProvider) = diff --git a/test/dotnet.Tests/CommandTests/Workload/Uninstall/GivenDotnetWorkloadUninstall.cs b/test/dotnet.Tests/CommandTests/Workload/Uninstall/GivenDotnetWorkloadUninstall.cs index 8c51323a9ed2..f7be89113b13 100644 --- a/test/dotnet.Tests/CommandTests/Workload/Uninstall/GivenDotnetWorkloadUninstall.cs +++ b/test/dotnet.Tests/CommandTests/Workload/Uninstall/GivenDotnetWorkloadUninstall.cs @@ -59,8 +59,7 @@ public void GivenWorkloadUninstallItErrorsWhenWorkloadIsNotInstalled() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenWorkloadUninstallItCanUninstallWorkload(bool userLocal) { var installingWorkload = "mock-1"; @@ -96,8 +95,7 @@ public void GivenWorkloadUninstallItWorksWithVerbosityFlag() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenWorkloadUninstallItCanUninstallOnlySpecifiedWorkload(bool userLocal) { var testDirectory = TestAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; @@ -140,8 +138,7 @@ public void GivenWorkloadUninstallItCanUninstallOnlySpecifiedWorkload(bool userL } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenWorkloadUninstallItCanUninstallOnlySpecifiedFeatureBand(bool userLocal) { var testDirectory = TestAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; diff --git a/test/dotnet.Tests/CommandTests/Workload/Update/GivenDotnetWorkloadUpdate.cs b/test/dotnet.Tests/CommandTests/Workload/Update/GivenDotnetWorkloadUpdate.cs index 21d9df16952d..3bfa5ad20be1 100644 --- a/test/dotnet.Tests/CommandTests/Workload/Update/GivenDotnetWorkloadUpdate.cs +++ b/test/dotnet.Tests/CommandTests/Workload/Update/GivenDotnetWorkloadUpdate.cs @@ -111,8 +111,7 @@ public void GivenWorkloadUpdateFromHistory() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenWorkloadUpdateItRemovesOldPacksAfterInstall(bool userLocal) { var testDirectory = TestAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; @@ -197,8 +196,7 @@ public void GivenWorkloadUpdateItRemovesOldPacksAfterInstall(bool userLocal) } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenWorkloadUpdateAcrossFeatureBandsItUpdatesPacks(bool userLocal) { var testDirectory = TestAssetsManager.CreateTestDirectory(identifier: userLocal ? "userlocal" : "default").Path; @@ -663,8 +661,7 @@ public void GivenInvalidVersionInRollbackFileItErrors() } [TestMethod] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void GivenMissingManifestsInWorkloadSetModeUpdateReinstallsManifests(bool userLocal) { var (dotnetRoot, userProfileDir, mockInstaller, workloadResolver, manifestProvider) = diff --git a/test/dotnet.Tests/PackagedCommandTests.cs b/test/dotnet.Tests/PackagedCommandTests.cs index 0105c272ba0f..49cb687f7011 100644 --- a/test/dotnet.Tests/PackagedCommandTests.cs +++ b/test/dotnet.Tests/PackagedCommandTests.cs @@ -43,8 +43,7 @@ public void TestProjectToolIsAvailableThroughDriver(string appName) [TestMethod] [RequiresSpecificFramework("netcoreapp1.1")] - [DataRow(true)] - [DataRow(false)] + [CombinatorialData] public void IfPreviousVersionOfSharedFrameworkIsInstalled_ToolsTargetingItRun(bool toolPrefersCLIRuntime) { var testInstance = TestAssetsManager.CopyTestAsset("AppWithToolDependency", identifier: toolPrefersCLIRuntime ? "preferCLIRuntime" : "") diff --git a/test/dotnet.Tests/ShellShimTests/ShellShimRepositoryTests.cs b/test/dotnet.Tests/ShellShimTests/ShellShimRepositoryTests.cs index aea8020b8c07..cfaa8ec5ed3f 100644 --- a/test/dotnet.Tests/ShellShimTests/ShellShimRepositoryTests.cs +++ b/test/dotnet.Tests/ShellShimTests/ShellShimRepositoryTests.cs @@ -132,8 +132,7 @@ public void GivenAShimItPassesThroughArguments(string arguments, string[] expect } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void GivenAShimConflictItWillRollback(bool testMockBehaviorIsInSync) { var shellCommandName = nameof(ShellShimRepositoryTests) + Path.GetRandomFileName(); @@ -177,8 +176,7 @@ public void GivenAShimConflictItWillRollback(bool testMockBehaviorIsInSync) } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void GivenAnExceptionItWillRollback(bool testMockBehaviorIsInSync) { var shellCommandName = nameof(ShellShimRepositoryTests) + Path.GetRandomFileName(); @@ -220,8 +218,7 @@ public void GivenAnExceptionItWillRollback(bool testMockBehaviorIsInSync) } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void GivenANonexistentShimRemoveDoesNotThrow(bool testMockBehaviorIsInSync) { var shellCommandName = nameof(ShellShimRepositoryTests) + Path.GetRandomFileName(); @@ -247,8 +244,7 @@ public void GivenANonexistentShimRemoveDoesNotThrow(bool testMockBehaviorIsInSyn } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void GivenAnInstalledShimRemoveDeletesTheShimFiles(bool testMockBehaviorIsInSync) { var shellCommandName = nameof(ShellShimRepositoryTests) + Path.GetRandomFileName(); @@ -278,8 +274,7 @@ public void GivenAnInstalledShimRemoveDeletesTheShimFiles(bool testMockBehaviorI } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void GivenAnInstalledShimRemoveRollsbackIfTransactionIsAborted(bool testMockBehaviorIsInSync) { var shellCommandName = nameof(ShellShimRepositoryTests) + Path.GetRandomFileName(); @@ -316,8 +311,7 @@ public void GivenAnInstalledShimRemoveRollsbackIfTransactionIsAborted(bool testM } [TestMethod] - [DataRow(false)] - [DataRow(true)] + [CombinatorialData] public void GivenAnInstalledShimRemoveCommitsIfTransactionIsCompleted(bool testMockBehaviorIsInSync) { var shellCommandName = nameof(ShellShimRepositoryTests) + Path.GetRandomFileName();