public void Update_SameValueExistsWithLowerTimestamp_DoesNotDoAnything(TestType value, Node node)
        {
            var clock = ImmutableSortedDictionary <Node, long> .Empty;

            _repository.PersistElement(new LWW_RegisterWithVCElement <TestType>(value, new VectorClock(clock.Add(node, 0)), false));

            _service.DownstreamAssign(value.Id, JToken.Parse(JsonConvert.SerializeObject(value)), new VectorClock(clock.Add(node, 1)));

            AssertExistsInRepository(value, new VectorClock(clock.Add(node, 0)));
        }
예제 #2
0
        public void Assign_SameValueExistsWithHigherTimestamp_DoesNotDoAnything(TestType value, Node node)
        {
            var clock = ImmutableSortedDictionary <Node, long> .Empty;

            _repository.PersistElement(new LWW_RegisterWithVCElement <TestType>(value, new VectorClock(clock.Add(node, 1)), false));

            _service.DownstreamAssign(value, new VectorClock(clock.Add(node, 0)));

            AssertExistsInRepository(value, new VectorClock(clock.Add(node, 1)));
        }