public void GivenAnExpense(string amount, string budget) { var debitAmount = decimal.Parse(amount); var flux = new Flow(budget, DateTime.Now, debitAmount, FlowType.Debit, "description"); service.Add(flux); }
public void Add(Flow flux) { var budget = budgetRepository.Budgets.FirstOrDefault(x => x.Name == flux.Budget); if (budget != null) { budget.Add(flux); } }
public void Add(Flow flow) { flows.Add(flow); }