コード例 #1
0
        public void Remove_AddDoesNotExist_DoesNotAddElementToTheRepository(TestType value, Guid tag, long timestamp)
        {
            _ourSetService.DownstreamRemove(value, new List <Guid> {
                tag
            }, timestamp);

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

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

            var repositoryValues = _repository.GetRemoves();

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