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); }
public TestResult(bool success, TestResultReason[] reasons) { _success = success; _reasons = reasons; }
public TestResult(bool success, TestResultReason reason) : this(success, new[] { reason }) { }
public TestResultReason(string message, TestResultReason[] reasons) { _message = message; _reasons = reasons; }
public TestResultReason(string message, TestResultReason reason) : this(message, new TestResultReason[] { reason }) { }
public TestResultReason(string message, TestResultReason reason) : this(message, new [] { reason }) { }