public void It_should_return_empty_list_when_no_errors() { var fluentValidationResult = new FluentValidation.Results.ValidationResult(); var validationErrors = FluentConverter.ToProjectValidationResult(fluentValidationResult); Assert.IsEmpty(validationErrors.ValidationErrors); }
public void It_should_map_error_message() { var fluentValidationResult = new FluentValidation.Results.ValidationResult(); fluentValidationResult.Errors.Add(new ValidationFailure("property", "error")); var validationErrors = FluentConverter.ToProjectValidationResult(fluentValidationResult); Assert.AreEqual(fluentValidationResult.Errors.Single().ErrorMessage, validationErrors.ValidationErrors.Single().ErrorMessage); }