示例#1
0
 public static IRuleBuilderOptions <T, string> ValidPaymentCardExpiryDate <T>(this IRuleBuilder <T, string> ruleBuilder)
 {
     return(ruleBuilder.Must(value =>
     {
         return PaymentValidationService.IsValidCardExpiryDate(value);
     }));
 }
示例#2
0
        public void IsValidCardExpiryDate_WhenExpiryDateHasPassed_ReturnsFalse()
        {
            // arrange
            var expiryDate = "01/2002";

            // act
            var result = PaymentValidationService.IsValidCardExpiryDate(expiryDate);

            // assert
            Assert.False(result);
        }