Interaction logic for Test.xaml
Exemplo n.º 1
0
        private void AddTest()
        {
            if (_currentTestSuit == null)
            {
                MessageBox.Show(this, "Select a test suit first.", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            if (_needUpdateTextPrettyPrint)
            {
                UpdateTextPrettyPrint();
            }
            var testSuitPath = _currentTestSuit.TestSuitPath;
            var dialog       = new AddTest(TestFullPath(testSuitPath), _text.Text, _prettyPrintTextBox.Text)
            {
                Owner = this
            };

            if (dialog.ShowDialog() ?? false)
            {
                var testName = dialog.TestName;
                LoadTests();
                SelectTest(testSuitPath, testName);
            }
        }
Exemplo n.º 2
0
        private void AddTest()
        {
            if (_currentTestSuit == null)
              {
            MessageBox.Show(this, "Select a test suit first.", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
            return;
              }

              if (_needUpdateTextPrettyPrint)
            UpdateTextPrettyPrint();
              var testSuitPath = _currentTestSuit.TestSuitPath;
              var dialog = new AddTest(TestFullPath(testSuitPath), _text.Text, _prettyPrintTextBox.Text) { Owner = this };
              if (dialog.ShowDialog() ?? false)
              {
            var testName = dialog.TestName;
            LoadTests();
            SelectTest(testSuitPath, testName);
              }
        }