コード例 #1
0
        /// <summary>
        /// Notifies observers that a test run has been started.
        /// </summary>
        /// <param name="e">The event data.</param>
        protected internal virtual void OnTestRunStarting(TestRunStartingEventArgs e)
        {
            #region Legacy logging code

            // Log the filter information
            if (LogWriter != null)
            {
                LogWriter.TestRunFilterSelected(e.TestRunFilter);
            }

            if (e.EnqueuedAssemblies > 0)
            {
                LogWriter.UnitTestHarnessStage(this, HarnessName, TestStage.Starting);
            }
            else
            {
                LogWriter.Warning(Properties.UnitTestMessage.UnitTestHarness_TestAssembliesNotActionable);
            }

            #endregion

            var handler = TestRunStarting;
            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        /// <summary>
        /// Determine what test assemblies need to be executed. Enqueue tasks
        /// for the unit test assembly providers to run the tests.
        /// </summary>
        private void PrepareTestAssemblyTasks()
        {
            UnitTestSettings settings = Settings;
            TestRunFilter    filter   = CreateTestRunFilter(settings);

            foreach (Assembly assembly in Settings.TestAssemblies)
            {
                EnqueueTestAssembly(assembly, filter);
            }

            TestRunStartingEventArgs startingArguments = new TestRunStartingEventArgs(settings, filter)
            {
                TestHarnessName    = HarnessName,
                EnqueuedAssemblies = _validTestAssemblies,
            };

            OnTestRunStarting(startingArguments);
        }
コード例 #3
0
ファイル: DataManager.cs プロジェクト: fstn/WindowsPhoneApps
 /// <summary>
 /// Process the starting of the test run.
 /// </summary>
 /// <param name="sender">The source object.</param>
 /// <param name="e">The event data.</param>
 private void OnTestRunStarting(object sender, TestRunStartingEventArgs e)
 {
     if (_d != null && e != null)
     {
         _d.Title = e.TestHarnessName;
         _d.TotalScenarios = _h.TestMethodCount;
     }
 }
コード例 #4
0
    /// <summary>
    /// Determine what test assemblies need to be executed. Enqueue tasks 
    /// for the unit test assembly providers to run the tests.
    /// </summary>
    private void PrepareTestAssemblyTasks()
    {
      UnitTestSettings settings = Settings;
      TestRunFilter filter = CreateTestRunFilter(settings);

      foreach (Assembly assembly in Settings.TestAssemblies)
      {
        EnqueueTestAssembly(assembly, filter);
      }

      TestRunStartingEventArgs startingArguments = new TestRunStartingEventArgs(settings, filter)
      {
        TestHarnessName = HarnessName,
        EnqueuedAssemblies = _validTestAssemblies,
      };

      OnTestRunStarting(startingArguments);
    }
コード例 #5
0
    /// <summary>
    /// Notifies observers that a test run has been started.
    /// </summary>
    /// <param name="e">The event data.</param>
    protected internal virtual void OnTestRunStarting(TestRunStartingEventArgs e)
    {
      #region Legacy logging code

      // Log the filter information
      if (LogWriter != null)
      {
        LogWriter.TestRunFilterSelected(e.TestRunFilter);
      }

      if (e.EnqueuedAssemblies > 0)
      {
        LogWriter.UnitTestHarnessStage(this, HarnessName, TestStage.Starting);
      }
      else
      {
        LogWriter.Warning(Properties.UnitTestMessage.UnitTestHarness_TestAssembliesNotActionable);
      }

      #endregion

      var handler = TestRunStarting;
      if (handler != null)
      {
        handler(this, e);
      }
    }
コード例 #6
0
 /// <summary>
 /// Calls the test run starting event.
 /// </summary>
 /// <param name="e">The event data.</param>
 public void SendTestRunStarting(TestRunStartingEventArgs e)
 {
   _harness.OnTestRunStarting(e);
 }
コード例 #7
0
 /// <summary>
 /// Calls the test run starting event.
 /// </summary>
 /// <param name="e">The event data.</param>
 public void SendTestRunStarting(TestRunStartingEventArgs e)
 {
     _harness.OnTestRunStarting(e);
 }