private static List<string> BuildMessageStrings(TestResultReason reason)
 {
     List<string> messages = new List<string>();
     if (reason.Reasons.Length == 0)
         messages.Add(reason.Message);
     else
     {
         foreach (TestResultReason subReason in reason.Reasons)
         {
             List<string> subMessages = BuildMessageStrings(subReason);
             foreach (string subMessage in subMessages)
             {
                 messages.Add(string.Format("{0} {1}", reason.Message, subMessage));
             }
         }
     }
     return messages;
 }
Esempio n. 2
0
            private static string GetTopLevelMessage(TestResultReason[] reasons)
            {
                if (reasons.Length == 0)
                    return null;

                string message = reasons[0].Message;
                return (!string.IsNullOrEmpty(message)) ? message : GetTopLevelMessage(reasons[0].Reasons);
            }
 public EntityValidationException(string message, TestResultReason[] reasons)
 {
 	_message = message;
     _reasons = reasons;
 }