Move test helper method to dedicated type to prevent unwanted spinup

This commit is contained in:
John Lewin 2018-10-31 16:23:44 -07:00
parent af2d39ccf9
commit 43f329cb8d
3 changed files with 7 additions and 3 deletions

View file

@ -107,7 +107,6 @@ namespace MatterHackers.MatterControl
Titillium,
};
public static class AppContext
{
/// <summary>

View file

@ -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();

View file

@ -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
}