diff --git a/test/MSBuildBinLogQuery.Tests/MSBuildBinLogQuery.Tests.csproj b/test/MSBuildBinLogQuery.Tests/MSBuildBinLogQuery.Tests.csproj index 26d9eb38..4ab11349 100644 --- a/test/MSBuildBinLogQuery.Tests/MSBuildBinLogQuery.Tests.csproj +++ b/test/MSBuildBinLogQuery.Tests/MSBuildBinLogQuery.Tests.csproj @@ -11,7 +11,7 @@ - + diff --git a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs index 20b0ed71..c4d5c584 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/Commands/CommandBundleFilterTests.cs @@ -105,14 +105,14 @@ internal void TestRequiredUninstallableWithOptionsMac(string command, string[] e internal void TestRequiredUninstallableWhenExplicitlyAdded(IEnumerable bundles, string command, string[] expectedUninstallableSdk, string[] expectedUninstallableRuntime) { - using var scope = new AssertionScope(); - scope.AddReportable("bundles", () => String.Join(Environment.NewLine, bundles.Select(b => b.ToDebugString()))); - scope.AddReportable("command", () => command); - scope.AddReportable("expectedUninstallableSdk", () => String.Join(Environment.NewLine, expectedUninstallableSdk)); - scope.AddReportable("expectedUninstallableRuntime", () => String.Join(Environment.NewLine, expectedUninstallableRuntime)); + var chain = AssertionChain.GetOrCreate(); + chain.AddReportable("bundles", () => String.Join(Environment.NewLine, bundles.Select(b => b.ToDebugString()))); + chain.AddReportable("command", () => command); + chain.AddReportable("expectedUninstallableSdk", () => String.Join(Environment.NewLine, expectedUninstallableSdk)); + chain.AddReportable("expectedUninstallableRuntime", () => String.Join(Environment.NewLine, expectedUninstallableRuntime)); var parseResult = CommandLineConfigs.UninstallRootCommand.Parse(command); var uninstallableBundles = CommandBundleFilter.GetFilteredBundles(bundles, parseResult); - scope.AddReportable("uninstallableBundles", () => String.Join(Environment.NewLine, uninstallableBundles.Select(b => b.ToDebugString()))); + chain.AddReportable("uninstallableBundles", () => String.Join(Environment.NewLine, uninstallableBundles.Select(b => b.ToDebugString()))); var uninstallableSdks = uninstallableBundles.Where(b => b.Version is SdkVersion).Select(b => b.DisplayName); var requiredSdks = bundles.Except(uninstallableBundles).Where(b => b.Version is SdkVersion).Select(b => b.DisplayName); diff --git a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs index c45abdfa..8c36e183 100644 --- a/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs +++ b/test/dotnet-core-uninstall.Tests/Shared/VSVersioning/VSVersionTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using FluentAssertions; @@ -136,9 +136,9 @@ internal void TestGetUninstallableNonSdkVersions(IEnumerable bundles, bo private void CheckAllowed(IEnumerable allBundles, IEnumerable uninstallableBundles, bool[] sdkAllowed, bool[] runtimeAllowed) { - using var scope = new AssertionScope(); - scope.AddReportable("allBundles", () => String.Join(Environment.NewLine, allBundles.Select(b => b.ToDebugString()))); - scope.AddReportable("uninstallableBundles", () => String.Join(Environment.NewLine, uninstallableBundles.Select(b => b.ToDebugString()))); + var chain = AssertionChain.GetOrCreate(); + chain.AddReportable("allBundles", () => String.Join(Environment.NewLine, allBundles.Select(b => b.ToDebugString()))); + chain.AddReportable("uninstallableBundles", () => String.Join(Environment.NewLine, uninstallableBundles.Select(b => b.ToDebugString()))); var sdkBundles = allBundles.Where(bundle => bundle.Version is SdkVersion).ToArray(); var runtimeBundles = allBundles.Where(bundle => bundle.Version is RuntimeVersion).ToArray(); var otherBundles = allBundles.Except(sdkBundles).Except(runtimeBundles); diff --git a/test/dotnet-core-uninstall.Tests/dotnet-core-uninstall.Tests.csproj b/test/dotnet-core-uninstall.Tests/dotnet-core-uninstall.Tests.csproj index abfcfdca..e5351147 100644 --- a/test/dotnet-core-uninstall.Tests/dotnet-core-uninstall.Tests.csproj +++ b/test/dotnet-core-uninstall.Tests/dotnet-core-uninstall.Tests.csproj @@ -4,7 +4,7 @@ - +