Ejemplo n.º 1
0
        public void Initialize()
        {
            var accountService = new AccountService();
            _Container.RegisterInstance<IAccountService>(accountService, new ContainerControlledLifetimeManager());

            var transactionService = new TransactionService();
            _Container.RegisterInstance<ITransactionService>(transactionService, new ContainerControlledLifetimeManager());

            var graphService = new GraphService();
            _Container.RegisterInstance<IGraphService>(graphService, new ContainerControlledLifetimeManager());
        }
Ejemplo n.º 2
0
        public void TransactionAdd()
        {
            var transactionService = new TransactionService();
            var transData = transactionService.GetTransactions();
            var transCount = transData.Count;

            transData.Add(new Transaction
            {
                Description = "Test Transaction",
                TimeStamp = DateTime.Now
            });

            Assert.AreEqual(++transCount, transData.Count);
        }