public void ConvertMaxDateTimeToKeySegmentTest() { var maxDateTime = DateTimeOffset.MaxValue.UtcDateTime; var maxDateTimeKeySeg = EntityKeySegmentResolvers.ConvertDateTimeToKeySegment(maxDateTime); Assert.AreEqual(maxDateTimeKeySeg, "5435d78a0bc8c000"); }
public void ConvertMinDateTimeToKeySegmentTest() { var minDateTime = DateTimeOffset.MinValue.UtcDateTime; var minDateTimeKeySeg = EntityKeySegmentResolvers.ConvertDateTimeToKeySegment(minDateTime); Assert.AreEqual(minDateTimeKeySeg, "7fffffffffffffff"); }
public void ConvertDateTimeToKeySegmentUtcLocalTest() { var dateTimeNow = DateTime.Now; var dateTimeUtcNow = dateTimeNow.ToUniversalTime(); var dateTimeNowKeySeg = EntityKeySegmentResolvers.ConvertDateTimeToKeySegment(dateTimeNow); var dateTimeUtcNowKeySeg = EntityKeySegmentResolvers.ConvertDateTimeToKeySegment(dateTimeUtcNow); Assert.AreEqual(dateTimeNowKeySeg, dateTimeUtcNowKeySeg); }