public void Add_WithExistingValues_AddsElementsToTheRepository(HashSet <TestType> existingValues, TestType value)
        {
            _repository.PersistValues(existingValues.ToImmutableHashSet());

            _gSetService.DownstreamAdd(value);

            var repositoryValues = _repository.GetValues();

            Assert.Equal(1, repositoryValues.Count(v => Equals(v, value)));
        }
Ejemplo n.º 2
0
        public void Merge_SingleElement_AddsElementsToTheRepository(HashSet <TestType> existingValues, TestType value)
        {
            _repository.PersistValues(existingValues.ToImmutableHashSet());

            _gSetService.Merge(new HashSet <TestType> {
                value
            }.ToImmutableHashSet());

            var repositoryValues = _repository.GetValues();

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