Beispiel #1
0
        public static void SetUp()
        {
            _accountRepository = new AccountRepository();
            Client client = ClientsRepository.CreateNewClient("test");

            _accountCard         = _accountRepository.AddCardAccount(client);
            _accountCard.Balance = startBalanceCardAccount;
            _accountDeposit      = _accountRepository.AddDepositAccount(client);
            _accountInterest     = _accountRepository.AddInterestAccount(client);
        }
        public static void SetUp()
        {
            _client            = ClientsRepository.CreateNewClient("test");
            _accountRepository = new AccountRepository();
            _accountDeposit    = _accountRepository.AddDepositAccount(_client);

            _accCard         = _accountRepository.AddCardAccount(_client);
            _accCard.Balance = 5000;
            _depositMock     = new Mock <IDepositRepository>();
            _accountMock     = new Mock <IAccountRepository>();
            _depositMock.Setup(x => x.CreateDeposit(It.IsAny <Client>(), It.IsAny <Account>(), It.IsAny <int>())).Returns(new Deposit(_client, _accountDeposit, DateTime.Today.AddMonths(_termMonth)));

            _accountMock.Setup(x => x.AddDepositAccount(It.IsAny <Client>())).Returns(_accountDeposit);
            _facade = new BankFacade
            {
                AccountRepository = _accountMock.Object,
                DepositRepository = _depositMock.Object
            };

            _termMonth  = 12;
            _depositSum = 2000;
        }
        public static void CardAccountIsDeposit()
        {
            Account account = _accountRepository.AddCardAccount(_client);

            Assert.AreEqual(account.TypeAccount, TypeAccount.Card);
        }