public void SutHasCorrectContents()
        {
            // Arrange
            var expectedBuilderTypes = new[]
            {
                typeof(StringGenerator),
                typeof(ConstrainedStringGenerator),
                typeof(StringSeedRelay),
                typeof(RandomNumericSequenceGenerator),
                typeof(RandomCharSequenceGenerator),
                typeof(UriGenerator),
                typeof(UriSchemeGenerator),
                typeof(RandomRangedNumberGenerator),
                typeof(RegularExpressionGenerator),
                typeof(RandomDateTimeSequenceGenerator),
                typeof(BooleanSwitch),
                typeof(GuidGenerator),
                typeof(TypeGenerator),
                typeof(DelegateGenerator),
                typeof(TaskGenerator),
                typeof(IntPtrGuard),
#if SYSTEM_NET_MAIL
                typeof(MailAddressGenerator),
#endif
                typeof(EmailAddressLocalPartGenerator),
                typeof(DomainNameGenerator)
            };
            // Act
            var sut = new DefaultPrimitiveBuilders();

            // Assert
            Assert.True(expectedBuilderTypes.SequenceEqual(sut.Select(b => b.GetType())));
        }
        public void SutHasCorrectContents()
        {
            // Fixture setup
            var expectedBuilderTypes = new[]
            {
                typeof(StringGenerator),
                typeof(ConstrainedStringGenerator),
                typeof(StringSeedRelay),
                typeof(RandomNumericSequenceGenerator),
                typeof(RandomCharSequenceGenerator),
                typeof(UriGenerator),
                typeof(UriSchemeGenerator),
                typeof(RangedNumberGenerator),
                typeof(RegularExpressionGenerator),
                typeof(RandomDateTimeSequenceGenerator),
                typeof(BooleanSwitch),
                typeof(GuidGenerator),
                typeof(TypeGenerator),
                typeof(DelegateGenerator),
                typeof(TaskGenerator),
                typeof(IntPtrGuard),
                typeof(MailAddressGenerator),
                typeof(EmailAddressLocalPartGenerator),
                typeof(DomainNameGenerator)
            };
            // Exercise system
            var sut = new DefaultPrimitiveBuilders();

            // Verify outcome
            Assert.True(expectedBuilderTypes.SequenceEqual(sut.Select(b => b.GetType())));
            // Teardown
        }
 public void SutHasCorrectContents()
 {
     // Fixture setup
     var expectedBuilderTypes = new[]
         {
             typeof(StringGenerator),
             typeof(ConstrainedStringGenerator),
             typeof(StringSeedRelay),
             typeof(NumericSequenceGenerator),
             typeof(CharSequenceGenerator),
             typeof(UriGenerator),
             typeof(UriSchemeGenerator),
             typeof(RangedNumberGenerator),
             typeof(RegularExpressionGenerator),
             typeof(StrictlyMonotonicallyIncreasingDateTimeGenerator),
             typeof(BooleanSwitch),
             typeof(GuidGenerator),
             typeof(TypeGenerator),
             typeof(DelegateGenerator),
             typeof(IntPtrGuard)
         };
     // Exercise system
     var sut = new DefaultPrimitiveBuilders();
     // Verify outcome
     Assert.True(expectedBuilderTypes.SequenceEqual(sut.Select(b => b.GetType())));
     // Teardown
 }
        public void SutIsSpecimenBuilders()
        {
            // Arrange
            // Act
            var sut = new DefaultPrimitiveBuilders();

            // Assert
            Assert.IsAssignableFrom <IEnumerable <ISpecimenBuilder> >(sut);
        }
 public void SutIsSpecimenBuilders()
 {
     // Fixture setup
     // Exercise system
     var sut = new DefaultPrimitiveBuilders();
     // Verify outcome
     Assert.IsAssignableFrom<IEnumerable<ISpecimenBuilder>>(sut);
     // Teardown
 }
 public void StringGeneratorHasFactoryThatCreatesCorrectType()
 {
     // Fixture setup
     var sut = new DefaultPrimitiveBuilders();
     // Exercise system
     var result = sut.OfType<StringGenerator>().Single();
     // Verify outcome
     Assert.IsAssignableFrom<Guid>(result.Factory());
     // Teardown
 }
 public void NonGenericEnumeratorMatchesGenericEnumerator()
 {
     // Fixture setup
     var sut = new DefaultPrimitiveBuilders();
     // Exercise system
     IEnumerable result = sut;
     // Verify outcome
     Assert.True(sut.Select(b => b.GetType()).SequenceEqual(result.Cast<object>().Select(o => o.GetType())));
     // Teardown
 }
        public void SutIsSpecimenBuilders()
        {
            // Fixture setup
            // Exercise system
            var sut = new DefaultPrimitiveBuilders();

            // Verify outcome
            Assert.IsAssignableFrom <IEnumerable <ISpecimenBuilder> >(sut);
            // Teardown
        }
        public void StringGeneratorFactoryReturnsNewInstancesForEachCall()
        {
            // Arrange
            var sut = new DefaultPrimitiveBuilders();
            // Act
            var result = sut.OfType <StringGenerator>().Single();

            // Assert
            Assert.NotEqual(result.Factory(), result.Factory());
        }
        public void StringGeneratorHasFactoryThatCreatesCorrectType()
        {
            // Arrange
            var sut = new DefaultPrimitiveBuilders();
            // Act
            var result = sut.OfType <StringGenerator>().Single();

            // Assert
            Assert.IsAssignableFrom <Guid>(result.Factory());
        }
        public void NonGenericEnumeratorMatchesGenericEnumerator()
        {
            // Arrange
            var sut = new DefaultPrimitiveBuilders();
            // Act
            IEnumerable result = sut;

            // Assert
            Assert.True(sut.Select(b => b.GetType()).SequenceEqual(result.Cast <object>().Select(o => o.GetType())));
        }
 public void StringGeneratorFactoryReturnsNewInstancesForEachCall()
 {
     // Fixture setup
     var sut = new DefaultPrimitiveBuilders();
     // Exercise system
     var result = sut.OfType<StringGenerator>().Single();
     // Verify outcome
     Assert.NotEqual(result.Factory(), result.Factory());
     // Teardown
 }
        public void StringGeneratorFactoryReturnsNewInstancesForEachCall()
        {
            // Fixture setup
            var sut = new DefaultPrimitiveBuilders();
            // Exercise system
            var result = sut.OfType <StringGenerator>().Single();

            // Verify outcome
            Assert.NotEqual(result.Factory(), result.Factory());
            // Teardown
        }
        public void StringGeneratorHasFactoryThatCreatesCorrectType()
        {
            // Fixture setup
            var sut = new DefaultPrimitiveBuilders();
            // Exercise system
            var result = sut.OfType <StringGenerator>().Single();

            // Verify outcome
            Assert.IsAssignableFrom <Guid>(result.Factory());
            // Teardown
        }
        public void NonGenericEnumeratorMatchesGenericEnumerator()
        {
            // Fixture setup
            var sut = new DefaultPrimitiveBuilders();
            // Exercise system
            IEnumerable result = sut;

            // Verify outcome
            Assert.True(sut.Select(b => b.GetType()).SequenceEqual(result.Cast <object>().Select(o => o.GetType())));
            // Teardown
        }
        public void InitializedWithDefaultConstructorSutHasCorrectContents()
        {
            // Arrange
            var expectedBuilders = new DefaultPrimitiveBuilders()
                                   .Concat(new DefaultRelays())
                                   .Select(b => b.GetType());
            // Act
            var sut = new DefaultEngineParts();

            // Assert
            Assert.True(expectedBuilders.SequenceEqual(sut.Select(b => b.GetType())));
        }
 public void InitializedWithDefaultConstructorSutHasCorrectContents()
 {
     // Fixture setup
     var expectedBuilders = new DefaultPrimitiveBuilders()
         .Concat(new DefaultRelays())
         .Select(b => b.GetType());
     // Exercise system
     var sut = new DefaultEngineParts();
     // Verify outcome
     Assert.True(expectedBuilders.SequenceEqual(sut.Select(b => b.GetType())));
     // Teardown
 }
        public void InitializedWithDefaultConstructorSutHasCorrectContents()
        {
            // Fixture setup
            var expectedBuilders = new DefaultPrimitiveBuilders()
                                   .Concat(new DefaultRelays())
                                   .Select(b => b.GetType());
            // Exercise system
            var sut = new DefaultEngineParts();

            // Verify outcome
            Assert.True(expectedBuilders.SequenceEqual(sut.Select(b => b.GetType())));
            // Teardown
        }