public void Remove_AddDoesNotExist_DoesNotAddElementToTheRepository(TestType value, Guid tag, Node node) { var clock = ImmutableSortedDictionary <Node, long> .Empty; _ourSetService.DownstreamRemove(value, new[] { tag }, new VectorClock(clock.Add(node, 0))); var repositoryValues = _repository.GetRemoves(); var actualValues = repositoryValues.Where(v => Equals(v.Value, value)); Assert.Empty(actualValues); }
public void MergeRemoves_SingleValueWithEmptyRepository_AddsElementsToTheRepository(OUR_SetWithVCElement <TestType> value) { _repository.PersistAdds(new List <OUR_SetWithVCElement <TestType> > { value }.ToImmutableHashSet()); _orSetService.Merge(ImmutableHashSet <OUR_SetWithVCElement <TestType> > .Empty, new List <OUR_SetWithVCElement <TestType> > { value }.ToImmutableHashSet()); var repositoryValues = _repository.GetRemoves(); Assert.Equal(1, repositoryValues.Count(x => Equals(x, value))); }