Example #1
0
        public void GetAccountByBankIdAndAccountNumberHandleAccountNotFound()
        {
            const string requestedBankId        = "TestBank";
            const string requestedAccountNumber = "12346578";

            var repository = new InMemoryBankAccountRepository();

            var locatedAccount = repository.GetAccountByBankIdAndAccountNumber(requestedBankId, requestedAccountNumber);

            Assert.That(locatedAccount, Is.Null);
        }
Example #2
0
        public void GetAccountByBankIdAndAccountNumberCanLocateAccount()
        {
            const int    userId        = 1;
            const string bankId        = "TestBank";
            const string accountNumber = "12346578";

            var repository = new InMemoryBankAccountRepository();

            var createdAccount = repository.CreateAccount(userId, bankId, accountNumber);
            var locatedAccount = repository.GetAccountByBankIdAndAccountNumber(bankId, accountNumber);

            Assert.That(createdAccount, Is.EqualTo(locatedAccount));
        }