Exemplo n.º 1
0
        public void GivenBankAccountValidator_WhenValidateInvalidBankAccountNumber_ThrowsException()
        {
            var bankAccountNumber = "12345678901234567890123456789012345";
            var validator         = new BankAccountValidator(bankAccountNumber);

            Assert.Throws <InvalidBankAccountException>(() => validator.Validate());
        }
Exemplo n.º 2
0
        public Customer StoreCustomer(Customer customer)
        {
            var bankAccountValidator = new BankAccountValidator(customer.BankAccountNumber);

            bankAccountValidator.Validate();

            var storedCustomer = StoreCustomerImplementation(customer);

            return(storedCustomer);
        }