public void TestDateTimeFromUtcBklogtime() { var expected = new DateTime(1972, 11, 5, 1, 23, 45, DateTimeKind.Utc); var logtime = new JET_BKLOGTIME(expected, false); DateTime? actual = logtime.ToDateTime(); Assert.AreEqual(expected, actual.Value); Assert.AreEqual(expected.Kind, actual.Value.Kind); }
public void TestDateTimeFromUtcBklogtime() { var expected = new DateTime(1972, 11, 5, 1, 23, 45, DateTimeKind.Utc); var logtime = new JET_BKLOGTIME(expected, false); DateTime?actual = logtime.ToDateTime(); Assert.AreEqual(expected, actual.Value); Assert.AreEqual(expected.Kind, actual.Value.Kind); }
public void TestBklogtimeIsSnapshot() { var expected = Any.DateTimeLimited; var logtime = new JET_BKLOGTIME(expected, true); DateTime?actual = logtime.ToDateTime(); Assert.AreEqual(expected, actual.Value); Assert.IsTrue(logtime.fOSSnapshot); }
public void JetBkinfoToString() { var bklogtime = new JET_BKLOGTIME(new DateTime(2010, 5, 31, 4, 44, 17, 678, DateTimeKind.Utc), true); var lgpos = new JET_LGPOS { lGeneration = 1, isec = 2, ib = 3 }; var bkinfo = new JET_BKINFO { bklogtimeMark = bklogtime, genHigh = 57, genLow = 36, lgposMark = lgpos }; Assert.AreEqual("JET_BKINFO(36-57:JET_LGPOS(0x1,2,3):JET_BKLOGTIME(17:44:4:31:5:110:0x4d:0xb))", bkinfo.ToString()); }
public void TestDateTimeFromNullBklogtime() { var logtime = new JET_BKLOGTIME(); Assert.IsNull(logtime.ToDateTime()); }
public void VerifyBklogtimeCanBeSerialized() { var expected = new JET_BKLOGTIME(DateTime.Now, false); SerializeAndCompare(expected); }
public void TestDateTimeFromNullBklogtime() { var logtime = new JET_BKLOGTIME(); Assert.IsNull(logtime.ToDateTime()); }
public void JetBklogtimeToString() { var bklogtime = new JET_BKLOGTIME(new DateTime(2010, 5, 31, 4, 44, 17, 678, DateTimeKind.Utc), true); Assert.AreEqual("JET_BKLOGTIME(17:44:4:31:5:110:0x4d:0xb)", bklogtime.ToString()); }
public void JetBkinfoToString() { var bklogtime = new JET_BKLOGTIME(new DateTime(2010, 5, 31, 4, 44, 17, DateTimeKind.Utc), true); var lgpos = new JET_LGPOS { lGeneration = 1, isec = 2, ib = 3 }; var bkinfo = new JET_BKINFO { bklogtimeMark = bklogtime, genHigh = 57, genLow = 36, lgposMark = lgpos }; Assert.AreEqual("JET_BKINFO(36-57:JET_LGPOS(0x1,2,3):JET_BKLOGTIME(17:44:4:31:5:110:0x80:0x80))", bkinfo.ToString()); }
public void JetBklogtimeToString() { var bklogtime = new JET_BKLOGTIME(new DateTime(2010, 5, 31, 4, 44, 17, DateTimeKind.Utc), true); Assert.AreEqual("JET_BKLOGTIME(17:44:4:31:5:110:0x80:0x80)", bklogtime.ToString()); }