Ejemplo n.º 1
0
        public IAccount CreateAccount(IAccount account)
        {
            var returnAccount = _storage.CreateAccount(account);

            _isDirty = true;
            return(null);
        }
Ejemplo n.º 2
0
        private void CreateTransaction()
        {
            var transactionName  = "Test Transaction";
            var transactionTotal = 213.00m;


            var account  = _accountStorage.CreateAccount("Test account", "Account Description", "EUR");
            var category = _categoryStorage.CreateCategory("Sample category", "Category Description", 0, null);

            _transaction = _storage.CreateTransaction(account, category, transactionName, transactionTotal, DateTime.Now, 0, 0.12m, null, null);
        }
Ejemplo n.º 3
0
        private IQuickTransaction CreateTransaction()
        {
            var account  = _accountStorage.CreateAccount("Test account", "Account Description", "EUR");
            var category = _categoryStorage.CreateCategory("Sample category", "Category Description", 0, null);


            var transaction = _storage.CreateQuickTransaction(
                account, category, "Simple Transaction", 100, 5, 0, false, false);

            return(transaction);
        }
Ejemplo n.º 4
0
        private ITransaction CreateTransaction(IAccountStorage accountManager, ICategoryStorage categoryManager, ITransactionFactory factory)
        {
            var transactionName  = "Test Transaction";
            var transactionTotal = 213.00m;


            var account  = accountManager.CreateAccount("Test account", "Account Description", "EUR");
            var category = categoryManager.CreateCategory("Sample category", "Category Description", 0, null);

            var result = factory.CreateTransaction(account, category, transactionName, transactionTotal, DateTime.Now, 0, 0.12m, null, null);

            return(result);
        }
Ejemplo n.º 5
0
        public void CreateBarCodeBasedTransactionText()
        {
            _storage.DeleteAllData();
            _transactionStorage.DeleteAllData();

            var account     = _accountStorage.CreateAccount("Account", "Description", "UAH");
            var category    = _categoryStorage.CreateCategory("Category", "category Description", 0, null);
            var transaction = _transactionStorage.CreateTransaction(account, category, "test", 26.38m, DateTime.Now, 0, 0, null, null);
            var barCode     = _storage.CreateBarCode(CreateBarCode("2734336010584", true, 6));

            barCode.Transaction = transaction;
            _storage.UpdateBarCode(barCode);
            _storage.CreateBarCode(CreateBarCode("5060207697224"));

            _storage.CreateTransactionBarCodeRelatedFromStorage("2734336");

            var transactions = _transactionStorage.GetAllTransactions();

            Assert.AreEqual(2, transactions.Count());
        }