public void DateUtils_AddDaysToCurrentDate1() { int? days = 1; long start = DateTime.Now.Ticks; DateTime?result = DateUtils.AddDaysToCurrentDate(days); Assert.IsNotNull(result); long diff = ((DateTime)result).Ticks - start; Assert.AreEqual(true, (diff - TimeSpan.TicksPerDay) >= 0); DateTime test1 = new DateTime(diff - A_DAY_IN_MS); DateTime test2 = new DateTime(A_DAY_IN_MS); Assert.AreEqual(true, (diff - A_DAY_IN_MS) < A_DAY_IN_MS); }