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);
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        public void TestDateTimeFromNullLogtime()
        {
            var logtime = new JET_LOGTIME();

            Assert.IsNull(logtime.ToDateTime());
        }
Beispiel #4
0
        public void VerifyLogtimeCanBeSerialized()
        {
            var expected = new JET_LOGTIME(DateTime.Now);

            SerializeAndCompare(expected);
        }
 public void TestDateTimeFromNullLogtime()
 {
     var logtime = new JET_LOGTIME();
     Assert.IsNull(logtime.ToDateTime());
 }
        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());
        }
Beispiel #7
0
 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());
 }