Exemplo n.º 1
0
 public void Visit(TestCaseResult result)
 {
     if(result.Executed)
     {
         if(result.IsFailure)
         {
             TestResultItem item = new TestResultItem(result);
             //string resultString = String.Format("{0}:{1}", result.Name, result.Message);
             testDetails.BeginUpdate();
             testDetails.Items.Insert(testDetails.Items.Count, item);
             testDetails.EndUpdate();
         }
     }
     else
     {
         notRunTree.Nodes.Add(MakeNotRunNode(result));
     }
 }
Exemplo n.º 2
0
		private void ProcessResults(TestResult result)
		{
			switch( result.ResultState )
			{
                case ResultState.Failure:
                case ResultState.Error:
					TestResultItem item = new TestResultItem(result);
					//string resultString = String.Format("{0}:{1}", result.Name, result.Message);
					testDetails.BeginUpdate();
					testDetails.Items.Insert(testDetails.Items.Count, item);
					testDetails.EndUpdate();
			        break;
                case ResultState.Skipped:
                case ResultState.NotRunnable:
                case ResultState.Ignored:
    				notRunTree.Nodes.Add(MakeNotRunNode(result));
			        break;
			}

			if ( result.HasResults )
				foreach (TestResult childResult in result.Results)
	                ProcessResults( childResult );
        }
Exemplo n.º 3
0
		private void InsertTestResultItem( TestResultItem item )
		{
			detailList.BeginUpdate();
			detailList.Items.Insert(detailList.Items.Count, item);
			detailList.SelectedIndex = 0;
			detailList.EndUpdate();
		}
Exemplo n.º 4
0
		private void InsertTestResultItem( TestResult result )
		{
			TestResultItem item = new TestResultItem(result);
			InsertTestResultItem( item );
		}
Exemplo n.º 5
0
		private void OnTestException(object sender, TestEventArgs args)
		{
			string msg = string.Format( "An unhandled {0} was thrown while executing this test : {1}",
				args.Exception.GetType().FullName, args.Exception.Message );
			TestResultItem item = new TestResultItem( args.Name, msg, args.Exception.StackTrace );
				
			InsertTestResultItem( item );
		}