diff --git a/mRemoteNGTests/AssemblyTestSetup.cs b/mRemoteNGTests/AssemblyTestSetup.cs new file mode 100644 index 000000000..5dae8ccd5 --- /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 d4abf59d7..795810de9 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 7a9afdcdf..2f18a05a0 100644 --- a/mRemoteNGTests/mRemoteNGTests.csproj +++ b/mRemoteNGTests/mRemoteNGTests.csproj @@ -109,6 +109,7 @@ +