public void TestDateTimeFromLocalLogtime() { var expected = new DateTime(1972, 11, 5, 1, 23, 45, DateTimeKind.Local); var logtime = new JET_LOGTIME(expected); DateTime? actual = logtime.ToDateTime(); Assert.AreEqual(expected, actual.Value); Assert.AreEqual(expected.Kind, actual.Value.Kind); }
public void TestDateTimeFromUtcLogtime() { var expected = new DateTime(1972, 11, 5, 1, 23, 45, DateTimeKind.Utc); var logtime = new JET_LOGTIME(expected); DateTime?actual = logtime.ToDateTime(); Assert.AreEqual(expected, actual.Value); Assert.AreEqual(expected.Kind, actual.Value.Kind); }
public void TestDateTimeFromNullLogtime() { var logtime = new JET_LOGTIME(); Assert.IsNull(logtime.ToDateTime()); }
public void VerifyLogtimeCanBeSerialized() { var expected = new JET_LOGTIME(DateTime.Now); SerializeAndCompare(expected); }
public void JetLogtimeToString() { var logtime = new JET_LOGTIME(new DateTime(2010, 5, 31, 4, 44, 17, 678, DateTimeKind.Utc)); Assert.AreEqual("JET_LOGTIME(17:44:4:31:5:110:0x4d:0xa)", logtime.ToString()); }
public void JetLogtimeToString() { var logtime = new JET_LOGTIME(new DateTime(2010, 5, 31, 4, 44, 17, DateTimeKind.Utc)); Assert.AreEqual("JET_LOGTIME(17:44:4:31:5:110:0x80:0x0)", logtime.ToString()); }