From f0b9167798ecb507d05506e1e1d908f21f49b5ca Mon Sep 17 00:00:00 2001 From: BDisp Date: Wed, 19 Jul 2023 16:56:00 +0100 Subject: [PATCH] Fixes #2758. ReSharper unit tests detects errors that VS2022 don't. --- UnitTests/TestHelpers.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/UnitTests/TestHelpers.cs b/UnitTests/TestHelpers.cs index b76da0a35f..de2ecfc142 100644 --- a/UnitTests/TestHelpers.cs +++ b/UnitTests/TestHelpers.cs @@ -11,6 +11,7 @@ using System.Text.RegularExpressions; using System.Reflection; using System.Diagnostics; +using System.Globalization; // This class enables test functions annotated with the [AutoInitShutdown] attribute to @@ -27,15 +28,15 @@ public class AutoInitShutdownAttribute : Xunit.Sdk.BeforeAfterTestAttribute { /// /// If true, Application.Init will be called Before the test runs. /// If true, Application.Shutdown will be called After the test runs. - /// Determins which ConsoleDriver (FakeDriver, WindowsDriver, - /// CursesDriver, NetDriver) will be used when Appliation.Init is called. If null FakeDriver will be used. + /// Determines which ConsoleDriver (FakeDriver, WindowsDriver, + /// CursesDriver, NetDriver) will be used when Application.Init is called. If null FakeDriver will be used. /// Only valid if is true. /// If true, will force the use of . - /// Only valid if == and is true. + /// Only valid if == and is true. /// Only valid if is true. - /// Only valid if == and is true. + /// Only valid if == and is true. /// Only valid if is true. - /// Only valid if == and is true. + /// Only valid if == and is true. public AutoInitShutdownAttribute (bool autoInit = true, bool autoShutdown = true, Type consoleDriverType = null, bool useFakeClipboard = false, @@ -44,6 +45,7 @@ public AutoInitShutdownAttribute (bool autoInit = true, bool autoShutdown = true { //Assert.True (autoInit == false && consoleDriverType == null); + CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.GetCultureInfo ("en-US"); AutoInit = autoInit; AutoShutdown = autoShutdown; DriverType = consoleDriverType ?? typeof (FakeDriver);