public override string ToString()
{
advanceTheTimeCursor(
() => new DateTime(pastToPresentCursor.Year + 1, thePast.Month, thePast.Day),
() => yearCounter++
);
advanceTheTimeCursor(
() => pastToPresentCursor + monthTimeToAdd(),
() => monthCounter++
);
advanceTheTimeCursor(
() => pastToPresentCursor + TimeSpan.FromDays(7),
() => weekCounter++
);
advanceTheTimeCursor(
() => pastToPresentCursor + TimeSpan.FromDays(1),
() => dayCounter++
);
return CreateTheString();
}
public void NextYearButLessThanAYear() { var t2 = new DateTime(2010, 7, 10); var o = new PeriodOfTimeOutput(basePast, t2); Assert.AreEqual("10 months, 1 week, 2 days", o.ToString()); }