Create() 공개 정적인 메소드

Initializes a new instance of the DataManager.
public static Create ( UnitTestHarness harness ) : DataManager
harness Microsoft.Silverlight.Testing.Harness.UnitTestHarness The unit test harness instance.
리턴 DataManager
예제 #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();
        }
        /// <summary>
        /// Starts the test run.
        /// </summary>
        private void StartTestRun()
        {
            if (!(DataContext is TestRunData))
            {
                _model = DataManager.Create(_harness);
                _model.Hook();

                DataContext = _model.Data;

                _slides.Add(SlideTestsRunning);
                _slides.MoveTo(SlideTestsRunning);

                _harness.TestHarnessCompleted += OnTestHarnessCompleted;
            }

            _harness.Run();
            RunOverview.Visibility = Visibility.Visible;
        }