public void WhenCreditCardNumberIsInvalidTestShouldFail(String value)
        {
            // arrange
            _sut.ChaseCreditCardNumber = value;
            String       TargetPropertyValue = value;
            const String TargetPropertyName  = nameof(_sut.ChaseCreditCardNumber);
            String       ExpectedMessage     = String.Format(Strings.CreditCardNumberIsNotAValidCreditCardNumberFormat, TargetPropertyName.GetWords(), TargetPropertyValue);

            // act assert
            base.RunValidation(TargetPropertyName, _sut, ExpectedMessage);
        }
Пример #2
0
        public void WhenLengthIsNotNineTestShouldFail(String value)
        {
            // arrange
            _sut.ChaseBankRoutingNumber = value;
            String       TargetPropertyValue = value;
            const String TargetPropertyName  = nameof(_sut.ChaseBankRoutingNumber);
            String       ExpectedMessage     = String.Format(Strings.ValueIsNotAValidBankRoutingNumberAllBankRoutingNumbersAreNineDigitsInLengthFormat, TargetPropertyName.GetWords(), TargetPropertyValue);

            // act assert
            base.RunValidation(TargetPropertyName, _sut, ExpectedMessage);
        }
        public void WhenAnyCreditCardCharacterIsNotADigitTestShouldFail(String value)
        {
            // arrange
            _sut.ChaseCreditCardNumber = value;
            String       TargetPropertyValue = value;
            const String TargetPropertyName  = nameof(_sut.ChaseCreditCardNumber);
            String       ExpectedMessage     = String.Format(Strings.CreditCardNumberIsNotAValidCreditCardNumberOnlyNumericInputIsAllowedFormat, TargetPropertyName.GetWords(), TargetPropertyValue);

            // act assert
            base.RunValidation(TargetPropertyName, _sut, ExpectedMessage);
        }
Пример #4
0
        public void WhenFirstCharacterIsNotAZeroOrOneTestShouldFail(String value)
        {
            // arrange
            _sut.ChaseBankRoutingNumber = value;
            String       TargetPropertyValue = value;
            const String TargetPropertyName  = nameof(_sut.ChaseBankRoutingNumber);
            String       ExpectedMessage     = String.Format(Strings.ValueIsNotAValidBankRoutingNumberAllBankRoutingNumbersFirstDigitMustBeZeorOrOneFormat, TargetPropertyName.GetWords(), TargetPropertyValue);

            // act assert
            base.RunValidation(TargetPropertyName, _sut, ExpectedMessage);
        }