public GenerationState() { TestCaseCollection = new TestCaseCollectionManager(); Template = new TemplateManager(); Settings = new SettingsManager(); List = new TestListManager(); Suite = new TestSuiteManager(); }
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; }; }