Microsoft.Silverlight.Testing.Harness.UnitTestHarness.OnTestMethodCompleted C# (CSharp) Method

OnTestMethodCompleted() protected method

Notifies observers that a test method has been completed. Also clears the test panel's visual tree.
protected OnTestMethodCompleted ( TestMethodCompletedEventArgs e ) : void
e TestMethodCompletedEventArgs The event data.
return void
        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();
            }
        }

Usage Example

 /// <summary>
 /// Calls the test method completed event.
 /// </summary>
 /// <param name="e">The event data.</param>
 public void SendTestMethodCompleted(TestMethodCompletedEventArgs e)
 {
     _harness.OnTestMethodCompleted(e);
 }