public ICategory CreateCategory(ICategory category) { var result = _storage.CreateCategory(category); _isDirty = true; return(result); }
public void CreateCategoryTest() { var newCategory = _storage.CreateCategory(_category); Assert.AreEqual(_category.Name, newCategory.Name); Assert.AreEqual(_category.Description, newCategory.Description); }
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); }
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); }
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); }
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()); }