Beispiel #1
0
 public void KeyToOffsetConversionTest()
 {
     for (long offset = 0; offset < 100000; offset++)
     {
         byte[] key     = StoreUtils.GetKeyFromOffset(offset);
         long   offset2 = StoreUtils.GetOffsetFromKey(key);
         Assert.Equal(offset, offset2);
     }
 }
Beispiel #2
0
        public void TestOperation()
        {
            long offset = 1000;

            byte[] key         = StoreUtils.GetKeyFromOffset(offset);
            byte[] obtainedKey = key.ToArray();
            Assert.Equal(key, obtainedKey);

            long obtainedOffset = StoreUtils.GetOffsetFromKey(key);

            Assert.Equal(offset, obtainedOffset);
            Assert.Equal(key, obtainedKey);
        }