public void ResolveErrorsWithoutMessageSource() { ValidationErrors errors = new ValidationErrors(); errors.AddError(string.Empty, ErrorMessageOne); IList <string> resolvedErrors = errors.GetResolvedErrors(string.Empty, null); Assert.AreEqual(ErrorMessageOne.Id, (string)resolvedErrors[0]); }
public void EmptyErrorsReturnEmptyCollections() { IValidationErrors errors = new ValidationErrors(); IList <ErrorMessage> typedErrors = errors.GetErrors("xyz"); Assert.IsNotNull(typedErrors); Assert.AreEqual(0, typedErrors.Count); IList <string> resolvedErrors = errors.GetResolvedErrors("xyz", new NullMessageSource()); Assert.IsNotNull(resolvedErrors); Assert.AreEqual(0, resolvedErrors.Count); }