public void CopyForward(CalendarDay day) { var incomplete = GoalsFor(day).Where(goal => !goal.Done).ToList(); var nextDay = day.AddDays(1); foreach (var goal in incomplete) { AddGoal(goal.Description, nextDay); } }
public void AddDays_ForwardNewMonth() { var day = new CalendarDay(2010, 8, 30); day = day.AddDays(2); Assert.AreEqual(day, new CalendarDay(2010, 9, 1)); }
public void AddDays_Forward7() { var day = new CalendarDay(2010, 8, 1); day = day.AddDays(7); Assert.AreEqual(day, new CalendarDay(2010, 8, 8)); }
public void AddDays_BackADay() { var day = new CalendarDay(2010, 8, 1); day = day.AddDays(-1); Assert.AreEqual(day, new CalendarDay(2010,7,31)); }