public void Add_NoExistingValues_AddsElementToTheRepository(LWW_SetWithVCElement <TestType> element)
        {
            _lwwSetService.Merge(new HashSet <LWW_SetWithVCElement <TestType> > {
                element
            }.ToImmutableHashSet(), ImmutableHashSet <LWW_SetWithVCElement <TestType> > .Empty);

            var repositoryValues = _repository.GetAdds();

            Assert.Contains(element, repositoryValues);
        }
Esempio n. 2
0
        public void Add_NoExistingValues_AddsElementToTheRepository(TestType value, Node node)
        {
            var clock = ImmutableSortedDictionary <Node, long> .Empty;

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

            var repositoryValues = _repository.GetAdds();

            Assert.Contains(value, repositoryValues.Select(v => v.Value));
        }