public void WhenHaveInvalidExpirationDate_ShouldHaveError() { var sut = new PaymentRequestModelValidator(); sut.ShouldHaveValidationErrorFor(m => m.ExpirationDate, DateTime.Now.AddDays(-1)); }
public void WhenExpirationDateDefault_ShouldHaveError() { var sut = new PaymentRequestModelValidator(); sut.ShouldHaveValidationErrorFor(m => m.ExpirationDate, new DateTime()); }
public void WhenHaveInvalidCreditCardNumber_ShouldHaveError() { var sut = new PaymentRequestModelValidator(); sut.ShouldHaveValidationErrorFor(m => m.CreditCardNumber, "123848484849"); }
public void WhenCardHolderNull_ShouldHaveError() { var sut = new PaymentRequestModelValidator(); sut.ShouldHaveValidationErrorFor(m => m.CardHolder, null as string); }
public void WhenAmountIsNegative_ShouldHaveError() { var sut = new PaymentRequestModelValidator(); sut.ShouldHaveValidationErrorFor(m => m.Amount, -0.5); }