Esempio n. 1
0
        public void ConvertMaxDateTimeToKeySegmentTest()
        {
            var maxDateTime       = DateTimeOffset.MaxValue.UtcDateTime;
            var maxDateTimeKeySeg = EntityKeySegmentResolvers.ConvertDateTimeToKeySegment(maxDateTime);

            Assert.AreEqual(maxDateTimeKeySeg, "5435d78a0bc8c000");
        }
Esempio n. 2
0
        public void ConvertMinDateTimeToKeySegmentTest()
        {
            var minDateTime       = DateTimeOffset.MinValue.UtcDateTime;
            var minDateTimeKeySeg = EntityKeySegmentResolvers.ConvertDateTimeToKeySegment(minDateTime);

            Assert.AreEqual(minDateTimeKeySeg, "7fffffffffffffff");
        }
Esempio n. 3
0
        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);
        }