public static IRuleBuilderOptions <T, string> ValidPaymentCardExpiryDate <T>(this IRuleBuilder <T, string> ruleBuilder) { return(ruleBuilder.Must(value => { return PaymentValidationService.IsValidCardExpiryDate(value); })); }
public void IsValidCardExpiryDate_WhenExpiryDateHasPassed_ReturnsFalse() { // arrange var expiryDate = "01/2002"; // act var result = PaymentValidationService.IsValidCardExpiryDate(expiryDate); // assert Assert.False(result); }