GetClassModel() публичный Метод

Gets or creates the data model object for a test class.
public GetClassModel ( ITestClass testClass ) : TestClassData
testClass ITestClass The test class.
Результат TestClassData
Пример #1
0
        /// <summary>
        /// Starts the test run.
        /// </summary>
        private void StartTestRun()
        {
            _model = DataManager.Create(_harness);
            _model.Hook();

            DataContext = _model.Data;

            ScrollViewer sv = resultsTreeView.GetScrollHost();

            // Keep the current test visible in the tree view control
            _harness.TestClassStarting += (x, xe) =>
            {
                if (resultsTreeView != null)
                {
                    resultsTreeView.SelectItem(_model.GetClassModel(xe.TestClass));
                }
                ;
            };
            _harness.TestMethodStarting += (x, xe) =>
            {
                if (sv != null)
                {
                    sv.ScrollToBottom();
                }
            };
            _harness.TestMethodCompleted  += OnTestMethodCompleted;
            _harness.TestHarnessCompleted += OnTestHarnessCompleted;
            _harness.TestAssemblyStarting += OnTestAssemblyStarting;

            _harness.Run();
        }
Пример #2
0
        /// <summary>
        /// Handles the completion of a test method.
        /// </summary>
        /// <param name="sender">The source object.</param>
        /// <param name="e">The event arguments.</param>
        private void OnTestMethodCompleted(object sender, TestMethodCompletedEventArgs e)
        {
            ScenarioResult result = e.Result;

            if (result.Result != TestOutcome.Passed)
            {
                TestMethodData tmd = _model.GetMethodModel(
                    e.Result.TestMethod,
                    _model.GetClassModel(e.Result.TestClass));
            }
        }
        /// <summary>
        /// Starts the test run.
        /// </summary>
        private void StartTestRun()
        {
            _model = DataManager.Create(_harness);
            _model.Hook();

            DataContext = _model.Data;

            ScrollViewer sv = resultsTreeView.GetScrollHost();

            // Keep the current test visible in the tree view control
            _harness.TestClassStarting += (x, xe) =>
                {
                    if (resultsTreeView != null)
                    {
                        resultsTreeView.SelectItem(_model.GetClassModel(xe.TestClass));
                    };
                };
            _harness.TestMethodStarting += (x, xe) =>
                {
                    if (sv != null)
                    {
                        sv.ScrollToBottom();
                    }
                };
            _harness.TestMethodCompleted += OnTestMethodCompleted;
            _harness.TestHarnessCompleted += OnTestHarnessCompleted;
            _harness.TestAssemblyStarting += OnTestAssemblyStarting;

            _harness.Run();
        }
        /// <summary>
        /// Starts the test run.
        /// </summary>
        private void StartTestRun()
        {
            _model = DataManager.Create(_harness);
            _model.Hook();

            DataContext = _model.Data;

            //ScrollViewer sv = resultsTreeView.GetScrollHost();

            // Keep the current test visible in the tree view control
            _harness.TestClassStarting += (sender, testClassStartingEventArgs) =>
                                              {
                                                  resultsTreeView.SelectItem(_model.GetClassModel(testClassStartingEventArgs.TestClass));
                                                  OnTestClassStarting(sender, testClassStartingEventArgs);
                                              };
            _harness.TestClassCompleted += new EventHandler<TestClassCompletedEventArgs>(OnTestClassCompleted);

            _harness.TestRunStarting += new EventHandler<TestRunStartingEventArgs>(OnTestRunStarting);

            _harness.TestMethodStarting += OnTestMethodStarting;
            _harness.TestMethodCompleted += OnTestMethodCompleted;

            _harness.TestHarnessCompleted += OnTestHarnessCompleted;

            _harness.TestAssemblyStarting += OnTestAssemblyStarting;
            _harness.TestAssemblyCompleted += OnTestAssemblyCompleted;

            _harness.Publishing += new EventHandler(_harness_Publishing);

            _harness.Run();
        }