Changeset 11515


Ignore:
Timestamp:
10/31/14 12:41:18 (6 years ago)
Author:
jkarder
Message:

#2211: changed my mind about testing ui code

Location:
trunk/sources
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Tests/AssemblyInitializer.cs

    r11514 r11515  
    1717      if (!Directory.Exists(SamplesDirectory)) Directory.CreateDirectory(SamplesDirectory);
    1818      if (!Directory.Exists(ScriptsDirectory)) Directory.CreateDirectory(ScriptsDirectory);
    19 
    20       // initialize the MainForm
    21       ScriptingUtils.InitializeMainForm();
    2219    }
    2320  }
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs

    r11514 r11515  
    2323using System.IO;
    2424using System.Threading;
    25 using HeuristicLab.MainForm;
    26 using HeuristicLab.MainForm.WindowsForms;
    2725using HeuristicLab.Scripting;
    2826using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    5452      return File.ReadAllText(path);
    5553    }
    56 
    57     public static void InitializeMainForm() {
    58       MainFormManager.RegisterMainForm(new DockingMainForm());
    59       var mainForm = MainFormManager.GetMainForm<MainForm.WindowsForms.MainForm>();
    60       mainForm.ShowContentInViewHost = true;
    61     }
    6254  }
    6355}
  • trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Scripts/GUIAutomationScriptTest.cs

    r11514 r11515  
    2121
    2222using System.IO;
    23 using System.Linq;
    24 using HeuristicLab.MainForm;
    25 using HeuristicLab.Optimization;
    2623using HeuristicLab.Persistence.Default.Xml;
    2724using HeuristicLab.Scripting;
     
    4542    }
    4643
    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 
    6244    private CSharpScript CreateGUIAutomationScript() {
    6345      var script = new CSharpScript {
  • trunk/sources/HeuristicLab.Tests/Test Resources/Script Sources/GA_QAP_Script.cs

    r11514 r11515  
    55using HeuristicLab.Data;
    66using HeuristicLab.Encodings.PermutationEncoding;
    7 using HeuristicLab.MainForm;
    87using HeuristicLab.Problems.Instances.QAPLIB;
    98using HeuristicLab.Problems.QuadraticAssignment;
     
    4039    qualityChart.Rows.Add(qualityRow);
    4140    vars.qualityChart = qualityChart;
    42     MainFormManager.MainForm.ShowContent(qualityChart);
    4341
    4442    for (int i = 0; i < popSize; i++) {
Note: See TracChangeset for help on using the changeset viewer.