Ejemplo n.º 1
0
        public void ShouldBeAbleToSave()
        {
            var originalValue   = RandomValue;
            var originalVersion = Kvs.Overwrite(Key, originalValue, DefaultTransaction);

            Assert.AreEqual(Kvs.Read(Key), originalValue);

            var newValue   = RandomValue;
            var newVersion = Kvs.Update(Key, newValue, originalVersion, DefaultTransaction);

            Assert.AreEqual(Kvs.Read(Key, out ulong version), newValue);
            Assert.AreEqual(version, newVersion);
        }