コード例 #1
0
        public void WhenHaveExpiryMonth_ShouldHaveNoError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldNotHaveValidationErrorFor(m => m.ExpiryMonth, DateTime.Now);
        }
コード例 #2
0
        public void WhenHaveCurrencyNull_ShouldHaveError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldHaveValidationErrorFor(m => m.currency, null as string);
        }
コード例 #3
0
        public void WhenHaveCurrency_ShouldHaveNoError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldNotHaveValidationErrorFor(m => m.currency, "MUR");
        }
コード例 #4
0
        public void WhenCvvGreaterthanFourDigits_ShouldHaveError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldHaveValidationErrorFor(m => m.cvv, 12345);
        }
コード例 #5
0
        public void WhenHaveCvv_ShouldHaveNoError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldNotHaveValidationErrorFor(m => m.cvv, 1234);
        }
コード例 #6
0
        public void WhenCvvLessthan4Characters_ShouldHaveError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldHaveValidationErrorFor(m => m.cvv, 123);
        }
コード例 #7
0
        public void WhenCardNumberIs16Characters_ShouldHaveNoError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldNotHaveValidationErrorFor(m => m.cardnumber, "1234567891234567");
        }
コード例 #8
0
        public void WhenCardNumberLessthan16Characters_ShouldHaveError()
        {
            var sut = new PaymentDetailsdtoValidator();

            sut.ShouldHaveValidationErrorFor(m => m.cardnumber, "123455");
        }