From faa561e6bc76b97b349410d540996a71fbfdeee3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 31 Dec 2025 21:54:19 +0000 Subject: [PATCH 1/3] Initial plan From 7e61476eef7701d7f946b2e4c038dc6d9ad0099a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 1 Jan 2026 15:12:27 +0000 Subject: [PATCH 2/3] Fix MSTest 4.0 analyzer errors for Dependabot update Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .../AssemblyInfo.cs | 4 ++++ .../IntegrationTests.cs | 10 +++++----- .../ProgramTests.cs | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs diff --git a/test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs b/test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs new file mode 100644 index 0000000..63051d4 --- /dev/null +++ b/test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; + +// Enable test parallelization at the method level +[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] diff --git a/test/DemaConsulting.DotnetToolWrapper.Tests/IntegrationTests.cs b/test/DemaConsulting.DotnetToolWrapper.Tests/IntegrationTests.cs index 728f7c6..92baf8b 100644 --- a/test/DemaConsulting.DotnetToolWrapper.Tests/IntegrationTests.cs +++ b/test/DemaConsulting.DotnetToolWrapper.Tests/IntegrationTests.cs @@ -141,8 +141,8 @@ public void TestMissingConfigFile() // Assert Assert.AreEqual(1, exitCode, "Exit code should be 1 for missing config file"); - Assert.IsTrue(output.Contains("Missing configuration file"), "Output should mention missing config file"); - Assert.IsTrue(output.Contains("DotnetToolWrapper.json"), "Output should mention config file name"); + Assert.Contains("Missing configuration file", output, "Output should mention missing config file"); + Assert.Contains("DotnetToolWrapper.json", output, "Output should mention config file name"); } /// @@ -202,7 +202,7 @@ public void TestArgumentPassing() // Assert Assert.AreEqual(0, exitCode, "Exit code should be 0"); - Assert.IsTrue(output.Contains(testText), $"Output should contain '{testText}'"); + Assert.Contains(testText, output, $"Output should contain '{testText}'"); } /// @@ -228,7 +228,7 @@ public void TestUnsupportedTarget() // Assert Assert.AreEqual(1, exitCode, "Exit code should be 1 for unsupported target"); - Assert.IsTrue(output.Contains("does not support"), "Output should mention unsupported target"); + Assert.Contains("does not support", output, "Output should mention unsupported target"); } /// @@ -255,6 +255,6 @@ public void TestBadConfiguration() // Assert Assert.AreEqual(1, exitCode, "Exit code should be 1 for bad configuration"); - Assert.IsTrue(output.Contains("Bad configuration"), "Output should mention bad configuration"); + Assert.Contains("Bad configuration", output, "Output should mention bad configuration"); } } diff --git a/test/DemaConsulting.DotnetToolWrapper.Tests/ProgramTests.cs b/test/DemaConsulting.DotnetToolWrapper.Tests/ProgramTests.cs index cae0ac5..14d4e3e 100644 --- a/test/DemaConsulting.DotnetToolWrapper.Tests/ProgramTests.cs +++ b/test/DemaConsulting.DotnetToolWrapper.Tests/ProgramTests.cs @@ -51,9 +51,9 @@ public void TestGetTarget() // Assert Assert.IsNotNull(target); - Assert.IsTrue(target.Contains('-'), "Target should contain a hyphen"); + Assert.Contains("-", target, "Target should contain a hyphen"); var parts = target.Split('-'); - Assert.AreEqual(2, parts.Length, "Target should have exactly two parts"); + Assert.HasCount(2, parts, "Target should have exactly two parts"); } } From fcabf0cabe7ea4501eba19d456670ed0873123ba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 1 Jan 2026 15:21:25 +0000 Subject: [PATCH 3/3] Fix test parallelization race condition with DoNotParallelize Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs b/test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs index 63051d4..a6e4c28 100644 --- a/test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs +++ b/test/DemaConsulting.DotnetToolWrapper.Tests/AssemblyInfo.cs @@ -1,4 +1,4 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; -// Enable test parallelization at the method level -[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)] +// Disable test parallelization to avoid race conditions with shared config files +[assembly: DoNotParallelize]