Esempio n. 1
0
        public void AtLocationForUnspecifiedDateTimeKindReturnsExpected()
        {
            var expectedUTC    = new DateTime(2016, 03, 22, 23, 0, 0, DateTimeKind.Utc);
            var timeAtLocation = new DateTime(2016, 03, 23, 4, 30, 0, DateTimeKind.Unspecified);
            var sut            = LocationDateTime.AtLocation(timeAtLocation, GetTestLocation());

            Assert.Equal(expectedUTC, sut.DateTimeInUTC);
        }
Esempio n. 2
0
 public void AtLocationForNonUnspecifiedDateTimeKindThrowsException()
 {
     Assert.Throws <ArgumentException>(() => LocationDateTime.AtLocation(DateTime.UtcNow, GetTestLocation()));
     Assert.Throws <ArgumentException>(() => LocationDateTime.AtLocation(DateTime.Now, GetTestLocation()));
 }