Automation runner must do as much as program.cs to spin up platform

This commit is contained in:
John Lewin 2018-08-02 18:49:49 -07:00
parent 4124704ba5
commit bfe781045b
2 changed files with 11 additions and 0 deletions

View file

@ -657,6 +657,11 @@ namespace MatterHackers.MatterControl.Tests.Automation
AutomationRunner.TimeToMoveMouse = config.TimeToMoveMouse;
AutomationRunner.UpDelaySeconds = config.MouseUpDelay;
// Automation runner must do as much as program.cs to spin up platform
string platformFeaturesProvider = "MatterHackers.MatterControl.WindowsPlatformsFeatures, MatterControl";
AppContext.Platform = AggContext.CreateInstanceFrom<INativePlatformFeatures>(platformFeaturesProvider);
AppContext.Platform.ProcessCommandline();
var (width, height) = RootSystemWindow.GetStartupBounds();
rootSystemWindow = Application.LoadRootWindow(