Example #1
0
 public void GetLastDateOfWeek_Kind()
 {
     Assert.AreEqual(DateTimeKind.Unspecified, DateTimeUtility.GetLastDateOfWeek(new DateTime(2018, 1, 1)).Kind);
     Assert.AreEqual(DateTimeKind.Local, DateTimeUtility.GetLastDateOfWeek(new DateTime(2018, 1, 1, 0, 0, 0, DateTimeKind.Local)).Kind);
     Assert.AreEqual(DateTimeKind.Utc, DateTimeUtility.GetLastDateOfWeek(new DateTime(2018, 1, 1, 0, 0, 0, DateTimeKind.Utc)).Kind);
 }
Example #2
0
 public void GetLastDateOfWeek_Failed()
 {
     Assert.AreEqual(DateTime.MaxValue, DateTimeUtility.GetLastDateOfWeek(new DateTime(9999, 12, 31)));
 }
Example #3
0
 public void GetLastDateOfWeek()
 {
     Assert.AreEqual(new DateTime(2018, 1, 6), DateTimeUtility.GetLastDateOfWeek(new DateTime(2018, 1, 1)));
 }