public void GetExpenseShouldReturnZeroExpenseAfterConstruction() { var list = new ExpenseList(); var result = list.GetExpense(Id); Assert.AreEqual(new Money(), result.Value); }
public void GetExpenseShouldReturnExpenseAfterItWasAddedWithAddExpenseUsingSameId() { var list = new ExpenseList(); var expenseValue = new Money(10m); list.AddExpense(new Expense(Id, expenseValue)); var result = list.GetExpense(Id); Assert.AreEqual(expenseValue, result.Value); }
public void AddExpenseShouldIncreaseExpenseAfterItWasAlreadyAdded() { var list = new ExpenseList(); var expenseValue = new Money(10m); list.AddExpense(new Expense(Id, expenseValue)); list.AddExpense(new Expense(Id, expenseValue)); var updatedExpense = list.GetExpense(Id); Assert.AreEqual(new Money(20m), updatedExpense.Value); }