public void WhenDoesNotExistWithSameNameThenAdd()
        {
            IPatternsAppliersHolder source = new EmptyPatternsAppliersHolder();

            var domainInspector = new Mock <IDomainInspector>();
            var toAdd           = new ConfOrm.Patterns.BidirectionalManyToManyInverseApplier(domainInspector.Object);

            source.UnionWith(toAdd);
            source.Collection.Count.Should().Be(1);
        }
        public void WhenExistWithSameNameThenRemoveAndAdd()
        {
            IPatternsAppliersHolder source = new EmptyPatternsAppliersHolder();

            var domainInspector = new Mock <IDomainInspector>();
            var toRemove        = new ConfOrm.Patterns.BidirectionalManyToManyInverseApplier(domainInspector.Object);

            source.Collection.Add(toRemove);

            var toAdd = new BidirectionalManyToManyInverseApplier();

            source.UnionWith(toAdd);
            source.Collection.Count.Should().Be(1);
            source.Collection.Single().Should().Be.SameInstanceAs(toAdd);
        }