Beispiel #1
0
        public CheckingAccountsController() : base()
        {
            var context               = new BankContext();
            var repository            = new CheckingAccountRepository(context);
            var repositoryClient      = new ClientRepository(context);
            var repositoryTransaction = new TransactionRepository(context);

            _accountsService = new CheckingAccountService(repository, repositoryClient, repositoryTransaction);
        }
Beispiel #2
0
        public void Setup()
        {
            var connection = DbConnectionFactory.CreatePersistent(Guid.NewGuid().ToString());

            _ctx        = new FakeDbContext(connection);
            _repository = new CheckingAccountRepository(_ctx);
            _account    = ObjectMother.GetCheckingAccountValid();
            //Seed
            _accountSeed = ObjectMother.GetCheckingAccountValid();
            _accountSeed.Transactions.Add(ObjectMother.GetTransactionCredit());
            _ctx.CheckingAccounts.Add(_accountSeed);
            _ctx.SaveChanges();
        }