From 9c101b748e7607de4522b28060c405905a6a82b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Thu, 4 Sep 2025 06:29:49 +0200 Subject: [PATCH 1/5] refactor: use latest Stryker.net version --- Pipeline/Build.MutationTests.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Pipeline/Build.MutationTests.cs b/Pipeline/Build.MutationTests.cs index a83cd765d..f646ff4d8 100644 --- a/Pipeline/Build.MutationTests.cs +++ b/Pipeline/Build.MutationTests.cs @@ -150,7 +150,6 @@ private void ExecuteMutationTest(Project project, Project[] testProjects) DotNetToolInstall(_ => _ .SetPackageName("dotnet-stryker") - .SetVersion("4.7.0") .SetToolInstallationPath(toolPath)); string branchName = BranchName; From c2a9dc57215a655fb54e1406a5d6b7b26d2eff5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Thu, 4 Sep 2025 06:43:29 +0200 Subject: [PATCH 2/5] Temporarily disable since filter --- Pipeline/Build.MutationTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipeline/Build.MutationTests.cs b/Pipeline/Build.MutationTests.cs index f646ff4d8..17a3e40a0 100644 --- a/Pipeline/Build.MutationTests.cs +++ b/Pipeline/Build.MutationTests.cs @@ -177,7 +177,7 @@ private void ExecuteMutationTest(Project project, Project[] testProjects) "target-framework": "net8.0", "since": { "target": "main", - "enabled": {{(BranchName != "main").ToString().ToLowerInvariant()}}, + "enabled": {{false}}, "ignore-changes-in": [ "**/.github/**/*.*" ] From 95828efed44e29017a4e08c3f7db6df4eed14a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Thu, 4 Sep 2025 08:04:36 +0200 Subject: [PATCH 3/5] Fix JSON error --- Pipeline/Build.MutationTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipeline/Build.MutationTests.cs b/Pipeline/Build.MutationTests.cs index 17a3e40a0..0f6b77337 100644 --- a/Pipeline/Build.MutationTests.cs +++ b/Pipeline/Build.MutationTests.cs @@ -177,7 +177,7 @@ private void ExecuteMutationTest(Project project, Project[] testProjects) "target-framework": "net8.0", "since": { "target": "main", - "enabled": {{false}}, + "enabled": false, "ignore-changes-in": [ "**/.github/**/*.*" ] From 271801fa9d423e03d322f632e3f98f2fd92fe814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Thu, 4 Sep 2025 11:46:01 +0200 Subject: [PATCH 4/5] Check if inverting the condition helps Stryker.net --- .../Core/Nodes/AsyncMappingNode.cs | 14 ++++---- .../aweXpect.Core/Core/Nodes/MappingNode.cs | 14 ++++---- Source/aweXpect.Core/Core/Nodes/WhichNode.cs | 32 +++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Source/aweXpect.Core/Core/Nodes/AsyncMappingNode.cs b/Source/aweXpect.Core/Core/Nodes/AsyncMappingNode.cs index b7d70a621..3029a5e46 100644 --- a/Source/aweXpect.Core/Core/Nodes/AsyncMappingNode.cs +++ b/Source/aweXpect.Core/Core/Nodes/AsyncMappingNode.cs @@ -43,16 +43,16 @@ public override async Task IsMetBy( return result.Fail("it was ", value); } - if (value is not TSource typedValue) + if (value is TSource typedValue) { - throw new InvalidOperationException( - $"The member type for the actual value in the which node did not match.{Environment.NewLine}Expected: {Formatter.Format(typeof(TSource))},{Environment.NewLine} Found: {Formatter.Format(value.GetType())}") - .LogTrace(); + TTarget matchingValue = await _memberAccessor.AccessMember(typedValue); + ConstraintResult memberResult = await base.IsMetBy(matchingValue, context, cancellationToken); + return memberResult.UseValue(value); } - TTarget matchingValue = await _memberAccessor.AccessMember(typedValue); - ConstraintResult memberResult = await base.IsMetBy(matchingValue, context, cancellationToken); - return memberResult.UseValue(value); + throw new InvalidOperationException( + $"The member type for the actual value in the which node did not match.{Environment.NewLine}Expected: {Formatter.Format(typeof(TSource))},{Environment.NewLine} Found: {Formatter.Format(value.GetType())}") + .LogTrace(); } /// diff --git a/Source/aweXpect.Core/Core/Nodes/MappingNode.cs b/Source/aweXpect.Core/Core/Nodes/MappingNode.cs index 6f116b08d..9f0a5a578 100644 --- a/Source/aweXpect.Core/Core/Nodes/MappingNode.cs +++ b/Source/aweXpect.Core/Core/Nodes/MappingNode.cs @@ -43,16 +43,16 @@ public override async Task IsMetBy( return result.Fail("it was ", value); } - if (value is not TSource typedValue) + if (value is TSource typedValue) { - throw new InvalidOperationException( - $"The member type for the actual value in the which node did not match.{Environment.NewLine}Expected: {Formatter.Format(typeof(TSource))},{Environment.NewLine} Found: {Formatter.Format(value.GetType())}") - .LogTrace(); + TTarget matchingValue = _memberAccessor.AccessMember(typedValue); + ConstraintResult memberResult = await base.IsMetBy(matchingValue, context, cancellationToken); + return memberResult.UseValue(value); } - TTarget matchingValue = _memberAccessor.AccessMember(typedValue); - ConstraintResult memberResult = await base.IsMetBy(matchingValue, context, cancellationToken); - return memberResult.UseValue(value); + throw new InvalidOperationException( + $"The member type for the actual value in the which node did not match.{Environment.NewLine}Expected: {Formatter.Format(typeof(TSource))},{Environment.NewLine} Found: {Formatter.Format(value.GetType())}") + .LogTrace(); } /// diff --git a/Source/aweXpect.Core/Core/Nodes/WhichNode.cs b/Source/aweXpect.Core/Core/Nodes/WhichNode.cs index 26fb345a9..5d14cac52 100644 --- a/Source/aweXpect.Core/Core/Nodes/WhichNode.cs +++ b/Source/aweXpect.Core/Core/Nodes/WhichNode.cs @@ -90,26 +90,26 @@ public override async Task IsMetBy( FurtherProcessingStrategy.IgnoreResult, default); } - if (value is not TSource typedValue) + if (value is TSource typedValue) { - throw new InvalidOperationException( - $"The member type for the actual value in the which node did not match.{Environment.NewLine} Found: {Formatter.Format(value.GetType())}{Environment.NewLine} Expected: {Formatter.Format(typeof(TSource))}") - .LogTrace(); - } + TMember? matchingValue; + if (_memberAccessor != null) + { + matchingValue = _memberAccessor(typedValue); + } + else + { + matchingValue = await _asyncMemberAccessor!.Invoke(typedValue); + } - TMember? matchingValue; - if (_memberAccessor != null) - { - matchingValue = _memberAccessor(typedValue); - } - else - { - matchingValue = await _asyncMemberAccessor!.Invoke(typedValue); + ConstraintResult result = await _inner.IsMetBy(matchingValue, context, cancellationToken); + return CombineResults(parentResult, result, _separator ?? "", FurtherProcessingStrategy.IgnoreResult, + matchingValue); } - ConstraintResult result = await _inner.IsMetBy(matchingValue, context, cancellationToken); - return CombineResults(parentResult, result, _separator ?? "", FurtherProcessingStrategy.IgnoreResult, - matchingValue); + throw new InvalidOperationException( + $"The member type for the actual value in the which node did not match.{Environment.NewLine} Found: {Formatter.Format(value.GetType())}{Environment.NewLine} Expected: {Formatter.Format(typeof(TSource))}") + .LogTrace(); } /// From 1e2f7d6593f9359314ee0a90dea040bb18ee8b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Thu, 4 Sep 2025 11:46:57 +0200 Subject: [PATCH 5/5] Revert disabling since --- Pipeline/Build.MutationTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipeline/Build.MutationTests.cs b/Pipeline/Build.MutationTests.cs index 0f6b77337..f646ff4d8 100644 --- a/Pipeline/Build.MutationTests.cs +++ b/Pipeline/Build.MutationTests.cs @@ -177,7 +177,7 @@ private void ExecuteMutationTest(Project project, Project[] testProjects) "target-framework": "net8.0", "since": { "target": "main", - "enabled": false, + "enabled": {{(BranchName != "main").ToString().ToLowerInvariant()}}, "ignore-changes-in": [ "**/.github/**/*.*" ]