Пример #1
0
 public void GetFirstDateOfWeek_Kind()
 {
     Assert.AreEqual(DateTimeKind.Unspecified, DateTimeUtility.GetFirstDateOfWeek(new DateTime(2018, 1, 1)).Kind);
     Assert.AreEqual(DateTimeKind.Local, DateTimeUtility.GetFirstDateOfWeek(new DateTime(2018, 1, 1, 0, 0, 0, DateTimeKind.Local)).Kind);
     Assert.AreEqual(DateTimeKind.Utc, DateTimeUtility.GetFirstDateOfWeek(new DateTime(2018, 1, 1, 0, 0, 0, DateTimeKind.Utc)).Kind);
 }
Пример #2
0
 public void GetFirstDateOfWeek_Failed()
 {
     Assert.AreEqual(DateTime.MinValue, DateTimeUtility.GetFirstDateOfWeek(new DateTime(1, 1, 1)));
 }
Пример #3
0
 public void GetFirstDateOfWeek()
 {
     Assert.AreEqual(new DateTime(2017, 12, 31), DateTimeUtility.GetFirstDateOfWeek(new DateTime(2018, 1, 1)));
 }