Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public static void SetUp()
 {
     _accountRepository = new AccountRepository();
     _client            = ClientsRepository.CreateNewClient("test");
 }