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