public static AutomationTesterHarness RunTest(Action <AutomationTesterHarness> testToRun, string testDbFolder = null, string staticDataPathOverride = null, double maxTimeToRun = 60) { if (staticDataPathOverride == null) { staticDataPathOverride = Path.Combine("..", "..", "..", "..", "StaticData"); } #if !__ANDROID__ // Set the static data to point to the directory of MatterControl StaticData.Instance = new MatterHackers.Agg.FileSystemStaticData(staticDataPathOverride); #endif bool showWindow; MatterControlUtilities.DataFolderState staticDataState = MatterControlUtilities.MakeNewStaticDataForTesting2(testDbFolder); MatterControlApplication matterControlWindow = MatterControlApplication.CreateInstance(out showWindow); AutomationTesterHarness testHarness = AutomationTesterHarness.ShowWindowAndExectueTests(matterControlWindow, testToRun, maxTimeToRun); MatterControlUtilities.RestoreStaticDataAfterTesting(staticDataState, true); return(testHarness); }