public void ValidateRequest_Should_Append_Expected_Validation_Errors() { var result = _paymentRequestValidator.ValidateRequest(new PaymentRequest { Currency = "invalid", CardNumber = "abcdefg", Cvv = "defdfg", Amount = -10.00M, ExpiryDate = "xx/9z" }); Assert.False(result.Success); Assert.NotEmpty(result.Result); Assert.Contains(ErrorMessages.Validation.FieldInvalidContent, result.Result.Where(x => x.FieldName == nameof(PaymentRequest.CardNumber)).Select(x => x.Error)); Assert.Contains(ErrorMessages.Validation.FieldInvalidLength, result.Result.Where(x => x.FieldName == nameof(PaymentRequest.CardNumber)).Select(x => x.Error)); Assert.Contains(ErrorMessages.Validation.FieldInvalidContent, result.Result.Where(x => x.FieldName == nameof(PaymentRequest.Cvv)).Select(x => x.Error)); Assert.Contains(ErrorMessages.Validation.FieldInvalidLength, result.Result.Where(x => x.FieldName == nameof(PaymentRequest.Cvv)).Select(x => x.Error)); Assert.Contains(ErrorMessages.Validation.FieldInvalidContent, result.Result.Where(x => x.FieldName == nameof(PaymentRequest.Currency)).Select(x => x.Error)); Assert.Contains(ErrorMessages.Validation.FieldInvalidContent, result.Result.Where(x => x.FieldName == nameof(PaymentRequest.ExpiryDate)).Select(x => x.Error)); Assert.Contains(ErrorMessages.Validation.FieldInvalidContent, result.Result.Where(x => x.FieldName == nameof(PaymentRequest.Amount)).Select(x => x.Error)); }