public void CaseFailed(FailResult result)
        {
            if (isParameterized)
            {
                var newTask = new TestCaseTask(result.Case.Name, nodeRunner.CurrentTask.AssemblyLocation);
                server.CreateDynamicElement(newTask);
                nodeRunner.AddTask(newTask);
            }

            var task = nodeRunner.CurrentTask;
            if (!string.IsNullOrWhiteSpace(result.Output))
                server.TaskOutput(task, result.Output, TaskOutputType.STDOUT);
            if (result.Exceptions != null && result.Exceptions.Any())
            {
                server.TaskException(task, result.Exceptions.Select(ex => new TaskException(ex)).ToArray());
                task.CloseTask(TaskResult.Exception, result.Case.Name);
            }
            else
            {
                task.CloseTask(TaskResult.Error, result.Case.Name);
            }

            if (isParameterized)
                nodeRunner.FinishCurrentTask(task);
        }
Exemplo n.º 2
0
 public static string CompoundStackTrace(this FailResult failResult)
 {
     using (var writer = new StringWriter())
     {
         WriteCompoundStackTraceTo(failResult, writer);
         return(writer.ToString());
     }
 }
Exemplo n.º 3
0
 public void CaseFailed(FailResult result)
 {
     failed++;
     inner.CaseFailed(result);
 }
Exemplo n.º 4
0
 public void CaseFailed(FailResult result)
 {
     failed++;
     inner.CaseFailed(result);
 }
Exemplo n.º 5
0
 public static string PrimaryExceptionTypeName(this FailResult failResult)
 {
     return(failResult.Exceptions.First().GetType().FullName);
 }
Exemplo n.º 6
0
 public static string PrimaryExceptionMessage(this FailResult failResult)
 {
     return(failResult.Exceptions.First().Message);
 }
Exemplo n.º 7
0
 public static void WriteCompoundStackTraceTo(this FailResult failResult, TextWriter writer)
 {
     writer.WriteCompoundStackTrace(failResult.Exceptions);
 }