public void Exclude_NoAdditionalExclusions_ReturnsExcludeFixed()
        {
            // Arrange
            var expectedResult = Substitute.For<ITypeExclusion>();

            var sut = new SutExcludeTypeExclusions(expectedResult);

            // Act
            var result = sut.Exclude;

            // Assert
            Assert.Same(expectedResult, result);
        }
        public void Exclude_NoAdditionalExclusions_ReturnsExcludeFixed()
        {
            // Arrange
            var expectedResult = Substitute.For <ITypeExclusion>();

            var sut = new SutExcludeTypeExclusions(expectedResult);

            // Act
            var result = sut.Exclude;

            // Assert
            Assert.Same(expectedResult, result);
        }
        public void Exclude_AdditionalExclusions_ReturnsCompositeTypeExclusion()
        {
            // Arrange
            var additional = Substitute.For<ITypeExclusion>();

            var excludeFixed = Substitute.For<ITypeExclusion>();
            var sut = new SutExcludeTypeExclusions(excludeFixed)
                      {
                          Exclude = additional
                      };

            // Act
            var result = (CompositeTypeExclusion)sut.Exclude;

            // Assert
            Assert.Equal(2, result.TypeExclusions.Count());
            Assert.Contains(excludeFixed, result.TypeExclusions);
            Assert.Contains(additional, result.TypeExclusions);
        }
        public void Exclude_AdditionalExclusions_ReturnsCompositeTypeExclusion()
        {
            // Arrange
            var additional = Substitute.For <ITypeExclusion>();

            var excludeFixed = Substitute.For <ITypeExclusion>();
            var sut          = new SutExcludeTypeExclusions(excludeFixed)
            {
                Exclude = additional
            };

            // Act
            var result = (CompositeTypeExclusion)sut.Exclude;

            // Assert
            Assert.Equal(2, result.TypeExclusions.Count());
            Assert.Contains(excludeFixed, result.TypeExclusions);
            Assert.Contains(additional, result.TypeExclusions);
        }