Ejemplo n.º 1
0
        public static void AssertTaskFinishedBadly(this TaskMessages taskMessages, Exception exception, bool infrastructure = false)
        {
            // Infrastructure exceptions (thrown when a class fails) are displayed with the short type name.
            // This is following the lead of nunit, which uses a JetBrains function to format things
            // Non-infrastructure exceptions use the full name
            Type exceptionType = exception.GetType();
            var  name          = infrastructure ? exceptionType.Name : exceptionType.FullName;

            taskMessages.AssertTaskFinished(name + ": " + exception.Message, TaskResult.Exception);
        }
Ejemplo n.º 2
0
 public static void AssertTaskStarting(this TaskMessages taskMessages)
 {
     taskMessages.AssertSingleMessage(ServerAction.TaskStarting);
 }
Ejemplo n.º 3
0
 public static void AssertCreateDynamicElement(this TaskMessages taskMessages)
 {
     taskMessages.AssertSingleMessage(ServerAction.CreateDynamicElement);
 }
Ejemplo n.º 4
0
 public static void AssertTaskException(this TaskMessages taskMessages, params TaskException[] exceptions)
 {
     taskMessages.AssertSingleMessage(ServerAction.TaskException, exceptions);
 }
Ejemplo n.º 5
0
 public static void AssertTaskException(this TaskMessages taskMessages, Exception exception)
 {
     taskMessages.AssertSingleMessage(ServerAction.TaskException, exception);
 }
Ejemplo n.º 6
0
 public static void AssertTaskExplain(this TaskMessages taskMessages, string explanation)
 {
     taskMessages.AssertSingleMessage(ServerAction.TaskExplain, explanation);
 }
Ejemplo n.º 7
0
 public static void AssertTaskOutput(this TaskMessages taskMessages, string text)
 {
     taskMessages.AssertSingleMessage(ServerAction.TaskOutput, text, TaskOutputType.STDOUT);
 }
Ejemplo n.º 8
0
 public static void AssertTaskDuration(this TaskMessages taskMessages, TimeSpan duration)
 {
     taskMessages.AssertSingleMessage(ServerAction.TaskDuration, duration);
 }
Ejemplo n.º 9
0
 public static void AssertTaskFinishedWithFailingChildren(this TaskMessages taskMessages)
 {
     taskMessages.AssertTaskFinished("One or more child tests failed", TaskResult.Exception);
 }
Ejemplo n.º 10
0
 public static void AssertTaskFinishedSuccessfully(this TaskMessages taskMessages)
 {
     taskMessages.AssertTaskFinished(string.Empty, TaskResult.Success);
 }
Ejemplo n.º 11
0
 public static void AssertTaskFinished(this TaskMessages taskMessages, string message, TaskResult result)
 {
     taskMessages.AssertSingleMessage(ServerAction.TaskFinished, message, result);
 }