Пример #1
0
        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);
        }
Пример #2
0
		public TestResult(bool success, TestResultReason[] reasons)
		{
			_success = success;
			_reasons = reasons;
		}
Пример #3
0
		public TestResult(bool success, TestResultReason reason)
			: this(success, new[] { reason })
		{
		}
Пример #4
0
 public TestResult(bool success, TestResultReason reason)
     : this(success, new[] { reason })
 {
 }
Пример #5
0
 public TestResultReason(string message, TestResultReason[] reasons)
 {
     _message = message;
     _reasons = reasons;
 }
Пример #6
0
 public TestResultReason(string message, TestResultReason reason)
     : this(message, new TestResultReason[] { reason })
 {
 }
Пример #7
0
 public TestResultReason(string message, TestResultReason reason)
     : this(message, new [] { reason })
 {
 }