Beispiel #1
0
        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;
                }
            };
        }
Beispiel #2
0
 public GenerationState()
 {
     TestCases = new TestCasesManager();
     Template  = new TemplateManager();
     Settings  = new SettingsManager();
     List      = new TestListManager();
     Suite     = new TestSuiteManager();
 }
Beispiel #3
0
 public GenerationState()
 {
     TestCaseCollection = new TestCaseCollectionManager();
     Templates          = new List <string>();
     Settings           = new SettingsManager();
     List        = new TestListManager();
     Suite       = new TestSuiteManager();
     Consumables = new Dictionary <string, object>();
     (new AutoConsumableAction(true)).Execute(this);
     Variables = new Dictionary <string, GlobalVariableXml>();
 }