public void SutYieldsInjectedSequence()
        {
            // Arrange
            var expectedBuilders = new ISpecimenBuilder[]
            {
                new DelegatingSpecimenBuilder(),
                new DelegatingSpecimenBuilder(),
                new DelegatingSpecimenBuilder()
            }.AsEnumerable();
            var sut = new CompositeSpecimenBuilder(expectedBuilders);

            // Act
            // Assert
            Assert.True(expectedBuilders.SequenceEqual(sut));
            Assert.True(expectedBuilders.OfType <object>().SequenceEqual(
                            ((System.Collections.IEnumerable)sut).OfType <object>()));
        }
Beispiel #2
0
        public void SutYieldsInjectedSequence()
        {
            // Fixture setup
            var expectedBuilders = new ISpecimenBuilder[]
            {
                new DelegatingSpecimenBuilder(),
                new DelegatingSpecimenBuilder(),
                new DelegatingSpecimenBuilder()
            }.AsEnumerable();
            var sut = new CompositeSpecimenBuilder(expectedBuilders);

            // Exercise system
            // Verify outcome
            Assert.True(expectedBuilders.SequenceEqual(sut));
            Assert.True(expectedBuilders.OfType <object>().SequenceEqual(
                            ((System.Collections.IEnumerable)sut).OfType <object>()));
            // Teardown
        }
 public void SutYieldsInjectedSequence()
 {
     // Fixture setup
     var expectedBuilders = new ISpecimenBuilder[]
     {
         new DelegatingSpecimenBuilder(),
         new DelegatingSpecimenBuilder(),
         new DelegatingSpecimenBuilder()
     }.AsEnumerable();
     var sut = new CompositeSpecimenBuilder(expectedBuilders);
     // Exercise system
     // Verify outcome
     Assert.True(expectedBuilders.SequenceEqual(sut));
     Assert.True(expectedBuilders.OfType<object>().SequenceEqual(
         ((System.Collections.IEnumerable)sut).OfType<object>()));
     // Teardown
 }