public void ExpectValidIdDefaultAccount()
        {
            // arrange
            var bankAccountRepository  = new Mocks.MockRegularBankAccountRepository();
            var bankAccountsController = new BankAccountsController(bankAccountRepository);
            var bankAccounts           = bankAccountRepository.GetBankAccounts();
            var Id = default(int?);

            // act
            Id = bankAccountsController.GetDefault();

            // assert
            Assert.IsTrue(Id > 0);
        }
        public void ExpectNonSyntheticDefaultAccount()
        {
            // arrange
            var bankAccountRepository = new Mocks.MockRegularBankAccountRepository();
            var bankAccounts          = bankAccountRepository.GetBankAccounts();
            var defaultAccountLocator = new DefaultBankAccountLocator(bankAccounts);
            var bankAccount           = default(BankAccount);

            // act
            bankAccount = defaultAccountLocator.FindDefaultBankAccount();

            // assert
            Assert.IsFalse(bankAccount.Synthetic);
        }
        public void ExpectDoublePositiveDefaultAccount()
        {
            // arrange
            var bankAccountRepository = new Mocks.MockRegularBankAccountRepository();
            var bankAccounts          = bankAccountRepository.GetBankAccounts();
            var defaultAccountLocator = new DefaultBankAccountLocator(bankAccounts);
            var bankAccount           = default(BankAccount);

            // act
            bankAccount = defaultAccountLocator.FindDefaultBankAccount();
            bool isDoubleHigher = bankAccounts.Where(bankAcc => !bankAcc.Id.Equals(bankAccount.Id)).All(bankAcc =>
            {
                return((bankAcc.Balance * 2) < bankAccount.Balance);
            });

            // assert
            Assert.IsTrue(isDoubleHigher);
        }