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 AssertTaskFinishedWithFailingChildren(this TaskMessages taskMessages)
 {
     taskMessages.AssertTaskFinished("One or more child tests failed", TaskResult.Exception);
 }
Ejemplo n.º 3
0
 public static void AssertTaskFinishedSuccessfully(this TaskMessages taskMessages)
 {
     taskMessages.AssertTaskFinished(string.Empty, TaskResult.Success);
 }