From c7fe5ae54689160515d3c332d18ac420085319c4 Mon Sep 17 00:00:00 2001 From: Evangelink <11340282+Evangelink@users.noreply.github.com> Date: Tue, 19 May 2026 12:52:55 +0200 Subject: [PATCH] Fix CA1305 in That_Coalesce_ShortCircuit_PassingAssertion_DoesNotInvokeRight Use CultureInfo.InvariantCulture for int.ToString() to satisfy CA1305. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../TestFramework.UnitTests/Assertions/AssertTests.That.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs b/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs index d0a9d9e004..605e09980e 100644 --- a/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs +++ b/test/UnitTests/TestFramework.UnitTests/Assertions/AssertTests.That.cs @@ -1157,7 +1157,7 @@ public void That_Coalesce_ShortCircuit_PassingAssertion_DoesNotInvokeRight() string? value = "hello"; // Non-null value short-circuits the null-coalescing operator; counter.Increment() must NOT run. - Action act = () => Assert.That(() => (value ?? counter.Increment().ToString()) == "hello"); + Action act = () => Assert.That(() => (value ?? counter.Increment().ToString(CultureInfo.InvariantCulture)) == "hello"); act.Should().NotThrow(); counter.Count.Should().Be(0);