public void Should_Have_Validation_Error_For_Invalid_Amount() { var validator = new PaymentRequestValidator(); validator.ShouldHaveValidationErrorFor(request => request.Amount, -0.003m); validator.ShouldHaveValidationErrorFor(request => request.Amount, -1); }
public void Should_Have_Validation_Error_For_Invalid_Cvv() { var validator = new PaymentRequestValidator(); validator.ShouldHaveValidationErrorFor(request => request.Cvv, null as string); validator.ShouldHaveValidationErrorFor(request => request.Cvv, ""); validator.ShouldHaveValidationErrorFor(request => request.Cvv, "abc1"); }
public void PaymentRequestValidator_Should_Error_When_Card_Is_Null() { _validator.ShouldHaveValidationErrorFor(x => x.Card, (Card)null); }
public void WhenCurrencyIsNull_ShouldHaveError(string currency) { var sut = new PaymentRequestValidator(); sut.ShouldHaveValidationErrorFor(x => x.Currency, currency); }
public void WhenOrderIdIsNull_ShouldHaveError(string orderId) { var sut = new PaymentRequestValidator(); sut.ShouldHaveValidationErrorFor(x => x.OrderId, orderId); }
public void WhenExpiryDateIsNullOrInWrongFormat_ShouldHaveError(string expiryDate) { var sut = new PaymentRequestValidator(); sut.ShouldHaveValidationErrorFor(x => x.ExpiryDate, expiryDate); }
public void WhenCvvIsNullOrInWrongFormat_ShouldHaveError(string cvv) { var sut = new PaymentRequestValidator(); sut.ShouldHaveValidationErrorFor(x => x.Cvv, cvv); }
public void WhenCardNumberIsNullOrInWrongFormat_ShouldHaveError(string cardNumber) { var sut = new PaymentRequestValidator(); sut.ShouldHaveValidationErrorFor(x => x.CardNumber, cardNumber); }
public void WhenMerchantIdIsInvalid_ShouldHaveError(string merchantId) { var sut = new PaymentRequestValidator(); sut.ShouldHaveValidationErrorFor(x => x.MerchantId, merchantId); }
public void WhenAmountIsNegative_ShouldHaveError(decimal amount) { var sut = new PaymentRequestValidator(); sut.ShouldHaveValidationErrorFor(x => x.Amount, amount); }
public void Should_Have_Validation_Error_For_Invalid_CardNumber(string cardNumber) { var validator = new PaymentRequestValidator(); validator.ShouldHaveValidationErrorFor(request => request.CardNumber, cardNumber); }