public TestListPresenter(TestListManager testListManager, LargeBindingList <Test> tests, DataTable testCases, BindingList <string> variables, string template, IDictionary <string, object> globalVariables) { this.ClearTestsXmlCommand = new ClearTestListCommand(this); this.GenerateTestsXmlCommand = new GenerateTestListCommand(this); this.UndoGenerateTestsXmlCommand = new UndoGenerateTestListCommand(this); this.DeleteTestCommand = new DeleteTestCommand(this); this.DisplayTestCommand = new EditTestCommand(this, new DisplayTestView()); this.AddCategoryCommand = new AddCategoryTestCommand(this, new NewCategoryWindow()); this.testListManager = testListManager; Tests = tests; TestCases = testCases; Variables = variables; Template = template; GlobalVariables = globalVariables; testListManager.Progressed += (sender, e) => { var newValue = Math.Min(100, 100 * e.Done / e.Total); if (newValue - Progress >= 5 || (newValue == 0 && Progress != 0) || (newValue == 100 && Progress != 100)) { Progress = newValue; } }; }
public TestSuiteState() { Variables = new BindingList<string>(); ConnectionStringNames = new BindingList<string>(); TestCases = new DataTable(); Tests = new LargeBindingList<Test>(); Settings = new BindingList<Setting>(); Settings.Add(new Setting() { Name = "Default - System-under-test" }); Settings.Add(new Setting() { Name = "Default - Assert" }); }
public TestListPresenter(TestListManager testListManager, LargeBindingList<Test> tests, DataTable testCases, BindingList<string> variables, string template) { this.ClearTestsXmlCommand = new ClearTestListCommand(this); this.GenerateTestsXmlCommand = new GenerateTestListCommand(this); this.UndoGenerateTestsXmlCommand = new UndoGenerateTestListCommand(this); this.DeleteTestCommand = new DeleteTestCommand(this); this.DisplayTestCommand = new EditTestCommand(this, new DisplayTestView()); this.AddCategoryCommand = new AddCategoryTestCommand(this, new NewCategoryWindow()); this.testListManager = testListManager; Tests = tests; TestCases = testCases; Variables = variables; Template = template; testListManager.Progressed += (sender, e) => { var newValue = Math.Min(100, 100 * e.Done / e.Total); if (newValue - Progress >= 5 || (newValue==0 && Progress!=0) || (newValue==100 && Progress!=100)) Progress = newValue; }; }