public void FromQuadrupleInputFactoryReturnsCorrectResult()
        {
            // Fixture setup
            Func <object, object, object, object, object> expectedFactory = (x, y, z, æ) => x;
            var expectedComposer = new DelegatingComposer <object>();
            var composer         = new DelegatingComposer {
                OnFromOverloadeFactory = f => f.Equals(expectedFactory) ? expectedComposer : new DelegatingComposer <object>()
            };

            var sut = new BehaviorComposer <object>(composer);
            // Exercise system
            var result = sut.FromFactory(expectedFactory);
            // Verify outcome
            var behaviorComposer = Assert.IsAssignableFrom <BehaviorPostprocessComposer <object> >(result);

            Assert.Equal(expectedComposer, behaviorComposer.Composer);
            // Teardown
        }
        public void FromBuilderFactoryReturnsCorrectResult()
        {
            // Fixture setup
            var expectedFactory  = new DelegatingSpecimenBuilder();
            var expectedComposer = new DelegatingComposer <Version>();
            var composer         = new DelegatingComposer <Version> {
                OnFromBuilder = f => f == expectedFactory ? expectedComposer : new DelegatingComposer <Version>()
            };

            var sut = new BehaviorComposer <Version>(composer);
            // Exercise system
            var result = sut.FromFactory(expectedFactory);
            // Verify outcome
            var behaviorComposer = Assert.IsAssignableFrom <BehaviorPostprocessComposer <Version> >(result);

            Assert.Equal(expectedComposer, behaviorComposer.Composer);
            // Teardown
        }
        public void FromQuadrupleInputFactoryReturnsCorrectResult()
        {
            // Fixture setup
            Func<object, object, object, object, object> expectedFactory = (x, y, z, æ) => x;
            var expectedComposer = new DelegatingComposer<object>();
            var composer = new DelegatingComposer { OnFromOverloadeFactory = f => f.Equals(expectedFactory) ? expectedComposer : new DelegatingComposer<object>() };

            var sut = new BehaviorComposer<object>(composer);
            // Exercise system
            var result = sut.FromFactory(expectedFactory);
            // Verify outcome
            var behaviorComposer = Assert.IsAssignableFrom<BehaviorPostprocessComposer<object>>(result);
            Assert.Equal(expectedComposer, behaviorComposer.Composer);
            // Teardown
        }
        public void FromBuilderFactoryReturnsCorrectResult()
        {
            // Fixture setup
            var expectedFactory = new DelegatingSpecimenBuilder();
            var expectedComposer = new DelegatingComposer<Version>();
            var composer = new DelegatingComposer<Version> { OnFromBuilder = f => f == expectedFactory ? expectedComposer : new DelegatingComposer<Version>() };

            var sut = new BehaviorComposer<Version>(composer);
            // Exercise system
            var result = sut.FromFactory(expectedFactory);
            // Verify outcome
            var behaviorComposer = Assert.IsAssignableFrom<BehaviorPostprocessComposer<Version>>(result);
            Assert.Equal(expectedComposer, behaviorComposer.Composer);
            // Teardown
        }