Changeset 11515
- Timestamp:
- 10/31/14 12:41:18 (10 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/AssemblyInitializer.cs
r11514 r11515 17 17 if (!Directory.Exists(SamplesDirectory)) Directory.CreateDirectory(SamplesDirectory); 18 18 if (!Directory.Exists(ScriptsDirectory)) Directory.CreateDirectory(ScriptsDirectory); 19 20 // initialize the MainForm21 ScriptingUtils.InitializeMainForm();22 19 } 23 20 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs
r11514 r11515 23 23 using System.IO; 24 24 using System.Threading; 25 using HeuristicLab.MainForm;26 using HeuristicLab.MainForm.WindowsForms;27 25 using HeuristicLab.Scripting; 28 26 using Microsoft.VisualStudio.TestTools.UnitTesting; … … 54 52 return File.ReadAllText(path); 55 53 } 56 57 public static void InitializeMainForm() {58 MainFormManager.RegisterMainForm(new DockingMainForm());59 var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();60 mainForm.ShowContentInViewHost = true;61 }62 54 } 63 55 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Scripts/GUIAutomationScriptTest.cs
r11514 r11515 21 21 22 22 using System.IO; 23 using System.Linq;24 using HeuristicLab.MainForm;25 using HeuristicLab.Optimization;26 23 using HeuristicLab.Persistence.Default.Xml; 27 24 using HeuristicLab.Scripting; … … 45 42 } 46 43 47 [TestMethod]48 [TestCategory("Scripts.Execute")]49 [TestProperty("Time", "long")]50 public void RunGUIAutomationScriptTest() {51 var script = CreateGUIAutomationScript();52 53 script.Compile();54 ScriptingUtils.RunScript(script);55 56 var experiment = ScriptingUtils.GetVariable<Experiment>(script, ExperimentVariableName);57 var contentViews = MainFormManager.MainForm.Views.OfType<IContentView>().ToList();58 Assert.IsNotNull(contentViews.SingleOrDefault(x => x.Content == experiment));59 Assert.IsNotNull(contentViews.SingleOrDefault(x => x.Content == experiment.Runs));60 }61 62 44 private CSharpScript CreateGUIAutomationScript() { 63 45 var script = new CSharpScript { -
trunk/sources/HeuristicLab.Tests/Test Resources/Script Sources/GA_QAP_Script.cs
r11514 r11515 5 5 using HeuristicLab.Data; 6 6 using HeuristicLab.Encodings.PermutationEncoding; 7 using HeuristicLab.MainForm;8 7 using HeuristicLab.Problems.Instances.QAPLIB; 9 8 using HeuristicLab.Problems.QuadraticAssignment; … … 40 39 qualityChart.Rows.Add(qualityRow); 41 40 vars.qualityChart = qualityChart; 42 MainFormManager.MainForm.ShowContent(qualityChart);43 41 44 42 for (int i = 0; i < popSize; i++) {
Note: See TracChangeset
for help on using the changeset viewer.