public TestInfo(string path, TestManifest testManifest) { this.Path = path; this.Text = LoadTest(path); this.Name = GetName(path); this.Options = testManifest[this.Name]; }
public TestInfo(string path, string baseName, string rootDir, TestManifest testManifest) { this.Path = path; this.Text = LoadTest(path); this.Name = GetName(path, baseName, rootDir); this.Options = testManifest[this.Name]; }
void OnEnable() { //If AutomationMaster has not been initialized, we may encounter errors using the Nexus window. Attaching the AutoConsole listener will allow for more helpful explanations. if (!AutomationMaster.Initialized) { Application.logMessageReceived -= AutoConsole.GetLog; //Detach if already attached. Application.logMessageReceived += AutoConsole.GetLog; //Attach handler to recieve incoming logs. } Application.logMessageReceived += ExceptionCallback; //Windows Architect = new DependencyArchitecture(); BuddyData = new BuddyData(); Console = new RunnerConsole(); CommandConsoleView = new CommandConsoleView(); Generator = new Generator(); Results = new RunResults(); Settings = new Settings(); Tests = new TestManifest(); Tools = new AdditionalTools(); Favorites = new Favorites(); Manifest = new Manifest(); Application.runInBackground = true; EditorApplication.playmodeStateChanged += PlaymodeStateChangeUpdates; Set(); m_ShowExtraFields = new AnimBool(true); m_ShowExtraFields.valueChanged.AddListener(Repaint); //Custom defined Tab order set from Additional Tools? List <string> tabOrderData = FileBroker.GetNonUnityTextResource(FileResource.NexusTabs).Split(AutomationMaster.DELIMITER).ToList().RemoveNullAndEmpty(); Dictionary <string, int> tabData = new Dictionary <string, int>(); for (int t = 0; t < tabOrderData.Count; t++) { string[] data = tabOrderData[t].Split('$'); tabData.Add(data.First(), data.Last().ToInt()); } TabDetails tab; //Test Manager Tab. int priorityId = 0; tabData.TryGetValue(Tests.GetType().Name, out priorityId); tab = new TabDetails(Tests, priorityId > 0 ? priorityId : 1); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha1 }; tab.Tabs.Add(new SizedTab("⇊", TabSize.Small, 18)); tab.Tabs.Add(new SizedTab("Tests", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Tests View", TabSize.Large)); AddWindowTab(tab); //Automation Console Window Tab. tabData.TryGetValue(Console.GetType().Name, out priorityId); tab = new TabDetails(Console, priorityId > 0 ? priorityId : 2); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha2 }; tab.Tabs.Add(new SizedTab("✦", TabSize.Small, 18)); tab.Tabs.Add(new SizedTab("Console", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Auto Console", TabSize.Large)); tab.OverrideScroll = true; AddWindowTab(tab); //Command Console View Tab. tabData.TryGetValue(CommandConsoleView.GetType().Name, out priorityId); tab = new TabDetails(CommandConsoleView, priorityId > 0 ? priorityId : 3); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha3 }; tab.Tabs.Add(new SizedTab("☊", TabSize.Small, 22)); tab.Tabs.Add(new SizedTab("Commands", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Commands View", TabSize.Large)); tab.OverrideScroll = true; AddWindowTab(tab); //Test Results Window Tab. tabData.TryGetValue(Results.GetType().Name, out priorityId); tab = new TabDetails(Results, priorityId > 0 ? priorityId : 4); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha4 }; tab.Tabs.Add(new SizedTab("☑", TabSize.Small, TextGreen, 18)); tab.Tabs.Add(new SizedTab("Results", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Tests Results", TabSize.Large)); AddWindowTab(tab); //Generator Window Tab. tabData.TryGetValue(Generator.GetType().Name, out priorityId); tab = new TabDetails(Generator, priorityId > 0 ? priorityId : 5); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha5 }; tab.Tabs.Add(new SizedTab("●", TabSize.Small, Color.red, 26)); tab.Tabs.Add(new SizedTab("Generator", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Generator", TabSize.Large)); tab.OverrideScroll = true; AddWindowTab(tab); //Architect Hidden Tab tabData.TryGetValue(Architect.GetType().Name, out priorityId); tab = new TabDetails(Architect, priorityId > 0 ? priorityId : 6); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha6 }; tab.Tabs.Add(new SizedTab("❖", TabSize.Small, 18)); tab.Tabs.Add(new SizedTab("Dep Arc", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Dependency", TabSize.Large)); AddWindowTab(tab); //Buddy Data Hidden Tab tabData.TryGetValue(BuddyData.GetType().Name, out priorityId); tab = new TabDetails(BuddyData, priorityId > 0 ? priorityId : 7); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha7 }; tab.Tabs.Add(new SizedTab("❦", TabSize.Small, 18)); tab.Tabs.Add(new SizedTab("Buddy", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Buddy Data", TabSize.Large)); AddWindowTab(tab); //Settings Hidden Tab tabData.TryGetValue(Settings.GetType().Name, out priorityId); tab = new TabDetails(Settings, priorityId > 0 ? priorityId : 8); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha8 }; tab.Tabs.Add(new SizedTab("✎", TabSize.Small, 18)); tab.Tabs.Add(new SizedTab("Settings", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Settings", TabSize.Large)); AddWindowTab(tab); //Other Tools Tab. tab = new TabDetails(Tools, 0); tab.Shortcut = new List <KeyCode> { KeyCode.Alpha9 }; tab.Tabs.Add(new SizedTab("✙", TabSize.Small, 18)); tab.Tabs.Add(new SizedTab("Tools", TabSize.Medium)); tab.Tabs.Add(new SizedTab("Other Tools", TabSize.Large)); AddWindowTab(tab); //Favorites Tab (Reusable Test Runs). tab = new TabDetails(Favorites, -1); AddWindowTab(tab); //Manifest Tab (Current Test Run). tab = new TabDetails(Manifest, -1); AddWindowTab(tab); AddPopup(ScriptableObject.CreateInstance <SimpleAlert>()); AddPopup(ScriptableObject.CreateInstance <RunTestsAlert>()); AddPopup(ScriptableObject.CreateInstance <RunClassesAlert>()); AddPopup(ScriptableObject.CreateInstance <ConsoleMessage>()); SelectTab(SwatWindows.Find(x => x.PriorityID == 1).Window); //Sets this as the default landing on load. }