Пример #1
0
        private void AddStep(object sender, EventArgs e)
        {
            TextFieldsToSteps();
            var ID = int.Parse((sender as Button).Name.Remove(0, 1)) + 1;

            if (ID == _currentTestCase.TestSteps.Count)
            {
                _currentTestCase.TestSteps.Add("");
            }
            else
            {
                _currentTestCase.TestSteps.Insert(ID, "");
            }
            FormControls.AddTestCaseField(this, _currentTestCase.TestSteps.Count - 1, "", new Point(20, 150 + _currentTestCase.TestSteps.Count * 20 - VerticalScroll.Value), new EventHandler(AddStep), new EventHandler(RemoveStep));
            StepsToTextFields();
        }
Пример #2
0
        public GUI_TestCase(TestCase testCase)
        {
            InitializeComponent();
            initialTestCase     = testCase;
            Documentation.Text  = initialTestCase.Documentation;
            TestName.Text       = initialTestCase.Name;
            ExpectedResult.Text = initialTestCase.ExpectedResult;

            var stepsCounter = 0;

            foreach (string step in initialTestCase.TestSteps)
            {
                FormControls.AddTestCaseField(this, stepsCounter, step, new Point(20, 170 + stepsCounter * 20), new EventHandler(AddStep), new EventHandler(RemoveStep));
                stepsCounter++;
            }
            _currentTestCase = CloneClass.Clone(initialTestCase);
        }
Пример #3
0
 private void AddStep_Click(object sender, EventArgs e)
 {
     TextFieldsToSteps();
     _currentTestCase.TestSteps.Add("");
     FormControls.AddTestCaseField(this, (_currentTestCase.TestSteps.Count - 1), "", new Point(20, 150 + _currentTestCase.TestSteps.Count * 20 - VerticalScroll.Value), new EventHandler(AddStep), new EventHandler(RemoveStep));
 }