public void Lookup_Added_ReturnsTrue(HashSet <LWW_SetWithVCElement <TestType> > existingAdds, HashSet <LWW_SetWithVCElement <TestType> > existingRemoves, LWW_SetWithVCElement <TestType> element) { _repository.PersistAdds(existingAdds.ToImmutableHashSet()); _repository.PersistRemoves(existingRemoves.ToImmutableHashSet()); _lwwSetService.Merge(new HashSet <LWW_SetWithVCElement <TestType> > { element }.ToImmutableHashSet(), ImmutableHashSet <LWW_SetWithVCElement <TestType> > .Empty); var lookup = _lwwSetService.Lookup(element.Value); Assert.True(lookup); }
public void Lookup_Added_ReturnsTrue(HashSet <LWW_SetWithVCElement <TestType> > existingAdds, HashSet <LWW_SetWithVCElement <TestType> > existingRemoves, TestType value, Node node) { var clock = ImmutableSortedDictionary <Node, long> .Empty; _repository.PersistAdds(existingAdds.ToImmutableHashSet()); _repository.PersistRemoves(existingRemoves.ToImmutableHashSet()); _lwwSetService.DownstreamAssign(value, new VectorClock(clock.Add(node, 0))); var lookup = _lwwSetService.Lookup(value); Assert.True(lookup); }