Esempio n. 1
0
        public void ShouldHaveCorrectCardNumber()
        {
            const string cardNumber = "379354508162306";

            var creditCardNumber = CreditCardNumber.For(cardNumber);

            creditCardNumber.Number.ShouldBe(cardNumber);
        }
Esempio n. 2
0
        public void ImplicitConversionToStringResultsInCorrectString()
        {
            const string cardNumber = "379354508162306";

            var creditCardNumber = CreditCardNumber.For(cardNumber);

            string result = creditCardNumber;

            result.ShouldBe(cardNumber);
        }
Esempio n. 3
0
        public void ToStringReturnsCorrectFormat()
        {
            const string cardNumber = "379354508162306";

            var creditCardNumber = CreditCardNumber.For(cardNumber);

            var result = creditCardNumber.ToString();

            result.ShouldBe(cardNumber);
        }