Interaction logic for Test.xaml
예제 #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);
            }
        }
예제 #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);
              }
        }