コード例 #1
0
        public void Remove_AddDoesNotExist_DoesNotAddElementToTheRepository(TestType value, Guid tag)
        {
            _orSetService.DownstreamRemove(value, new[] { tag });

            var repositoryValues = _repository.GetRemoves();
            var actualValues     = repositoryValues.Where(v => Equals(v.Value, value));

            Assert.Empty(actualValues);
        }
コード例 #2
0
        public void MergeRemoves_SingleValueWithEmptyRepository_AddsElementsToTheRepository(OR_SetElement <TestType> value)
        {
            _repository.PersistAdds(new HashSet <OR_SetElement <TestType> > {
                value
            }.ToImmutableHashSet());
            _orSetService.Merge(ImmutableHashSet <OR_SetElement <TestType> > .Empty, new HashSet <OR_SetElement <TestType> > {
                value
            }.ToImmutableHashSet());

            var repositoryValues = _repository.GetRemoves();

            Assert.Equal(1, repositoryValues.Count(x => Equals(x, value)));
        }