Example #1
0
        public void TestEmptystringAsCardNumber()
        {
            bool cardIsValid = CardValidationUtils.PerformLuhnCheck(EMPTY_STRING);

            Assert.IsFalse(cardIsValid, "Test Invalid Card Number " + EMPTY_STRING);
        }
Example #2
0
        public void TestAlphastringAsCardNumber()
        {
            bool cardIsValid = CardValidationUtils.PerformLuhnCheck(ALPHA_STRING);

            Assert.IsFalse(cardIsValid, "Test Invalid Card Number " + ALPHA_STRING);
        }
Example #3
0
        public void TestInvalidCardNumber()
        {
            bool cardIsValid = CardValidationUtils.PerformLuhnCheck(INVALID_CARD_NUM);

            Assert.IsFalse(cardIsValid, "Test Invalid Card Number " + INVALID_CARD_NUM);
        }
Example #4
0
        public void TestInvalidCardNumberWithSpaces()
        {
            bool cardIsValid = CardValidationUtils.PerformLuhnCheck(INVALID_CARD_NUM_WITH_SPACES);

            Assert.IsFalse(cardIsValid, "Test Invalid Card Number " + INVALID_CARD_NUM_WITH_SPACES);
        }
Example #5
0
        public void TestValidCardNumber()
        {
            bool cardIsValid = CardValidationUtils.PerformLuhnCheck(VALID_CARD_NUM);

            Assert.IsTrue(cardIsValid, "Test Valid Card Number " + VALID_CARD_NUM);
        }