Example #1
0
 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);
     }
 }
Example #2
0
 public void AddDays_ForwardNewMonth()
 {
     var day = new CalendarDay(2010, 8, 30);
     day = day.AddDays(2);
     Assert.AreEqual(day, new CalendarDay(2010, 9, 1));
 }
Example #3
0
 public void AddDays_Forward7()
 {
     var day = new CalendarDay(2010, 8, 1);
     day = day.AddDays(7);
     Assert.AreEqual(day, new CalendarDay(2010, 8, 8));
 }
Example #4
0
 public void AddDays_BackADay()
 {
     var day = new CalendarDay(2010, 8, 1);
     day = day.AddDays(-1);
     Assert.AreEqual(day, new CalendarDay(2010,7,31));
 }