public void GetUberSpan_SetDates_Day() { TimeWindowCore target = new TimeWindowCore(new DateTime(2012, 2, 3)); Assert.AreEqual(target.GetUberSpan(), UberSpan.Day, "Same day treated as one day"); target = new TimeWindowCore(new DateTime(2012, 2, 29)); Assert.AreEqual(target.GetUberSpan(), UberSpan.Day, "Leap year check :P Azure went down 8 hrs on this day!"); }
public void GetUberSpan_SetDates_Year() { var target = new TimeWindowCore(new DateTime(2012, 1, 1)); target.GoYear(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Year); target = new TimeWindowCore(new DateTime(2011, 3, 15)); target.GoYear(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Year); }
public void GetUberSpan_SetDates_Month() { var target = new TimeWindowCore(new DateTime(2012, 3, 3)); target.GoMonth(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Month); target = new TimeWindowCore(new DateTime(2012, 3, 2)); target.GoMonth(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Month); target = new TimeWindowCore(new DateTime(2012, 3, 1)); target.GoMonth(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Month); }
public void GetUberSpan_SetDates_Week() { var target = new TimeWindowCore(new DateTime(2012, 2, 2)); target.GoWeek(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Week, "Week expected"); target = new TimeWindowCore(new DateTime(2012, 3, 4)); target.GoWeek(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Week, "Week expected"); target = new TimeWindowCore(new DateTime(2012, 3, 5)); target.GoWeek(); Assert.AreEqual(target.GetUberSpan(), UberSpan.Week, "Week expected"); }