From 43f329cb8de8bfbbf78ae571ab49486ad500b0c3 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Wed, 31 Oct 2018 16:23:44 -0700 Subject: [PATCH] Move test helper method to dedicated type to prevent unwanted spinup --- MatterControlLib/ApplicationView/ApplicationController.cs | 1 - MatterControlLib/MatterControlApplication.cs | 5 ++++- Tests/MatterControl.Tests/MatterControl/ReleaseBuildTests.cs | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index 5fe3bbcbc..3357f9ee8 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -107,7 +107,6 @@ namespace MatterHackers.MatterControl Titillium, }; - public static class AppContext { /// diff --git a/MatterControlLib/MatterControlApplication.cs b/MatterControlLib/MatterControlApplication.cs index 6fa0b525f..66b59c055 100644 --- a/MatterControlLib/MatterControlApplication.cs +++ b/MatterControlLib/MatterControlApplication.cs @@ -47,7 +47,10 @@ namespace MatterHackers.MatterControl MCWSBaseUri = "https://mattercontrol.appspot.com"; } } + } + public static class BuildValidationTests + { private static void AssertDebugNotDefined() { #if DEBUG @@ -57,7 +60,7 @@ namespace MatterHackers.MatterControl public static void CheckKnownAssemblyConditionalCompSymbols() { - MatterControlApplication.AssertDebugNotDefined(); + BuildValidationTests.AssertDebugNotDefined(); GCodeFile.AssertDebugNotDefined(); MatterHackers.Agg.Graphics2D.AssertDebugNotDefined(); MatterHackers.Agg.UI.SystemWindow.AssertDebugNotDefined(); diff --git a/Tests/MatterControl.Tests/MatterControl/ReleaseBuildTests.cs b/Tests/MatterControl.Tests/MatterControl/ReleaseBuildTests.cs index c167f7df8..863c65376 100644 --- a/Tests/MatterControl.Tests/MatterControl/ReleaseBuildTests.cs +++ b/Tests/MatterControl.Tests/MatterControl/ReleaseBuildTests.cs @@ -97,6 +97,8 @@ namespace MatterControl.Tests { await MatterControlUtilities.RunTest((testRunner) => { + testRunner.WaitForName("PartPreviewContent"); + Assert.IsTrue(testRunner.NameExists("PartPreviewContent")); return Task.CompletedTask; @@ -129,7 +131,7 @@ namespace MatterControl.Tests public void ClassicDebugComplicationFlagTests() { #if (!DEBUG) - MatterControlApplication.CheckKnownAssemblyConditionalCompSymbols(); + BuildValidationTests.CheckKnownAssemblyConditionalCompSymbols(); #endif }