コード例 #1
0
        public void CanGetTextualRepresentationForExceptionWithEmptyValidationResults()
        {
            var exception = new ArgumentValidationException(new ValidationResults(), "param");
            var toString = exception.ToString();

            Assert.IsNotNull(toString);
        }
コード例 #2
0
        public void CanGetTextualRepresentationForExceptionWithKeylessValidationResults()
        {
            var results = new ValidationResults();
            results.AddResult(new ValidationResult("message1", null, null, null, null));
            var exception = new ArgumentValidationException(results, "param");
            var toString = exception.ToString();

            Assert.IsNotNull(toString);
            Assert.IsTrue(toString.Contains("message1"));
        }