public decimal TotalAmount(DateTime start, DateTime end) { var budgets = _budgetRpos.GetAll(); Period period = new Period(start, end); decimal tottalAmount = 0; foreach (var budget in budgets) { tottalAmount += budget.OverlappingAmount(period); } return(tottalAmount); }
private void GivenBudgets(params Budget[] budgets) { _stubRpos.GetAll().Returns(budgets.ToList()); }