Test method completed event arguments, contains the result.
        public void OnTestMethodCompleted(object sender, TestMethodCompletedEventArgs e)
        {
            var convertedResult = _silverlightUnitTestAbstractionsFactory.Convert(e.Result);
            var serializedResult = _serializationService.Serialize(convertedResult);

            InvokeExternalMethod("TestMethodCompleted", serializedResult);
        }
        private void OnTestMethodCompleted(object sender, TestMethodCompletedEventArgs e)
        {
            // Setup initial conditions.
            if (runState == null || !IsRunning) return;
            var methodInfo = e.Result.TestMethod.Method;
            var success = e.Result.Exception == null;

            // Store appropriate value.
            (success ? runState.Passed : runState.Failed).Add(methodInfo);
        }
        /// <summary>
        /// Notifies observers that a test method has been completed. Also
        /// clears the test panel's visual tree.
        /// </summary>
        /// <param name="e">The event data.</param>
        protected internal virtual void OnTestMethodCompleted(TestMethodCompletedEventArgs e)
        {
            var handler = TestMethodCompleted;

            if (handler != null)
            {
                handler(this, e);
            }

            // Clear the test panel
            if (TestPanelManager != null)
            {
                TestPanelManager.ClearUsedChildren();
            }
        }
 /// <summary>
 /// Calls the test method completed event.
 /// </summary>
 /// <param name="e">The event data.</param>
 public void SendTestMethodCompleted(TestMethodCompletedEventArgs e)
 {
     _harness.OnTestMethodCompleted(e);
 }
        /// <summary>
        /// Notifies observers that a test method has been completed. Also
        /// clears the test panel's visual tree.
        /// </summary>
        /// <param name="e">The event data.</param>
        protected internal virtual void OnTestMethodCompleted(TestMethodCompletedEventArgs e)
        {
            var handler = TestMethodCompleted;
            if (handler != null)
            {
                handler(this, e);
            }

            // Clear the test panel
            if (TestPanelManager != null)
            {
                TestPanelManager.ClearUsedChildren();
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Process the completion of test methods.
        /// </summary>
        /// <param name="sender">The source object.</param>
        /// <param name="e">The event data.</param>
        private void OnTestMethodCompleted(object sender, TestMethodCompletedEventArgs e)
        {
            ScenarioResult result = e.Result;
            if (result == null)
            {
                throw new InvalidOperationException("The result was not present.");
            }

            ProcessResult(result);
        }
        /// <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>
        /// 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));
            }

            if (_remoteTestingApplicationService != null)
            {
                _remoteTestingApplicationService.OnTestMethodCompleted(sender, e);
            }
        }
Exemplo n.º 9
0
 protected override void OnTestMethodCompleted(TestMethodCompletedEventArgs e)
 {
     Dispatcher.BeginInvoke(new Action<TestMethodCompletedEventArgs>(base.OnTestMethodCompleted), e);
 }