public void ShowSpendingsInCategoryByDay_CategoryIsNull_Return0() { BudgetModel model = new BudgetModel(); string category = "food"; model.AddCategory(category); model.AddIncome(20); model.AddSpending(category, 10); decimal expected = 0; decimal actual = model.ShowSpendingsInCategoryByDay(null, DateTime.Today); Assert.That(actual, Is.EqualTo(expected)); }
public void ShowSpendingsInCategoryByDay_TwoSpendingsWithAmounts10And15_Return25() { BudgetModel model = new BudgetModel(); string category = "food"; model.AddCategory(category); model.AddIncome(100); model.AddSpending(category, 10); model.AddSpending(category, 15); decimal expected = 25; decimal actual = model.ShowSpendingsInCategoryByDay("food", DateTime.Today); Assert.That(actual, Is.EqualTo(expected)); }