public void MergeAdds_SingleValueWithEmptyRepository_AddsElementsToTheRepository(TestType value, Guid tag) { var element = new OR_OptimizedSetElement <TestType>(value, tag, false); _orSetService.Merge(new HashSet <OR_OptimizedSetElement <TestType> > { element }.ToImmutableHashSet()); var repositoryValues = _repository.GetElements(); Assert.Equal(1, repositoryValues.Count(x => Equals(x, element))); }
public void Add_NoExistingValues_AddsElementToTheRepository(TestType value, Guid tag) { _orSetService.DownstreamAdd(value, tag); var repositoryValues = _repository.GetElements(); var actualValues = repositoryValues.Where(v => Equals(v.Value, value) && v.Tag == tag); Assert.Single(actualValues); }