From c3ae438e9c387942e199cea9b56e18923b542583 Mon Sep 17 00:00:00 2001 From: David Sparer Date: Thu, 24 May 2018 17:48:44 -0500 Subject: [PATCH] fix failing test --- mRemoteNGTests/AssemblyTestSetup.cs | 17 +++++++++++++++++ .../UI/Controls/TextBoxExtensionsTestForm.cs | 1 - mRemoteNGTests/mRemoteNGTests.csproj | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 mRemoteNGTests/AssemblyTestSetup.cs diff --git a/mRemoteNGTests/AssemblyTestSetup.cs b/mRemoteNGTests/AssemblyTestSetup.cs new file mode 100644 index 00000000..5dae8ccd --- /dev/null +++ b/mRemoteNGTests/AssemblyTestSetup.cs @@ -0,0 +1,17 @@ +using System.Windows.Forms; +using NUnit.Framework; + + +// Dont put this in a namespace. Leaving it by itself tells NUnit +// to run it on assembly load +[SetUpFixture] +public class AssemblyTestSetup +{ + [OneTimeSetUp] + public void AssemblySetup() + { + // ensure window options set before any test window created + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + } +} diff --git a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.cs b/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.cs index d4abf59d..795810de 100644 --- a/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.cs +++ b/mRemoteNGTests/UI/Controls/TextBoxExtensionsTestForm.cs @@ -6,7 +6,6 @@ namespace mRemoteNGTests.UI.Controls { public TextBoxExtensionsTestForm() { - Application.EnableVisualStyles(); InitializeComponent(); } } diff --git a/mRemoteNGTests/mRemoteNGTests.csproj b/mRemoteNGTests/mRemoteNGTests.csproj index 7a9afdcd..2f18a05a 100644 --- a/mRemoteNGTests/mRemoteNGTests.csproj +++ b/mRemoteNGTests/mRemoteNGTests.csproj @@ -109,6 +109,7 @@ +