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

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

            // assert
            Assert.False(result);
        }
Ejemplo n.º 3
0
 public void Setup()
 {
     paymentValidationService = new PaymentValidationService();
 }