Пример #1
0
        public void CompareTo_ByTimestamp_SequentialTimestamps()
        {
            TimeGuid lastGuid = null;

            foreach (var timestamp in TimeGuidBitsLayoutTest.AllDistinctTimestamps(TimeSpan.FromHours(10)))
            {
                var nextGuid = TimeGuid.NewGuid(timestamp);
                Assert.That(lastGuid < nextGuid);
                Assert.That(nextGuid > lastGuid);
                if (lastGuid != null)
                {
                    Assert.That(nextGuid, Is.GreaterThan(lastGuid));
                    Assert.That(nextGuid.GetTimestamp(), Is.GreaterThan(lastGuid.GetTimestamp()));
                }
                lastGuid = nextGuid;
            }
        }
 private static string FormatColumnName([NotNull] TimeGuid columnId)
 {
     return($"{columnId.GetTimestamp().Ticks.ToString("D20", CultureInfo.InvariantCulture)}_{columnId.ToGuid()}");
 }