public void SkipDayTest() { var p = new MockPlanning(); var dayToSkip = new Day(new List <AbstractTask> { new MockTask() }); p.SetContent(new List <IWeek> { new IWeek ( new List <AbstractDay> { dayToSkip, new Day(), new Day(), new Day(), new Day(), new Day(), new Day() } ) }); var curDayBeforeSkip = 0; // The current day, which is also the day to skip, has a task Assert.IsNotNull(p.GetNextPlannedTask()); // At first its normal that the day isn't as pos 1, its pos 0 Assert.AreNotEqual(p.GetDays()[1], dayToSkip); p.SkipDay(dayToSkip); // We verify that we are still the same day Assert.AreEqual(0, curDayBeforeSkip); // But we skipped it, so we don't have any task to do, so null reference for the task Assert.IsNull(p.GetNextPlannedTask()); // Skip the planning until we reach the end to see if it will finish }