public void CanGetTextualRepresentationForExceptionWithEmptyValidationResults() { var exception = new ArgumentValidationException(new ValidationResults(), "param"); var toString = exception.ToString(); Assert.IsNotNull(toString); }
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")); }