Beispiel #1
0
        public void SutIsSpecimenBuilders()
        {
            // Arrange
            // Act
            var sut = new DefaultRelays();

            // Assert
            Assert.IsAssignableFrom <IEnumerable <ISpecimenBuilder> >(sut);
        }
 public void SutIsSpecimenBuilders()
 {
     // Fixture setup
     // Exercise system
     var sut = new DefaultRelays();
     // Verify outcome
     Assert.IsAssignableFrom<IEnumerable<ISpecimenBuilder>>(sut);
     // Teardown
 }
        public void SutIsSpecimenBuilders()
        {
            // Fixture setup
            // Exercise system
            var sut = new DefaultRelays();

            // Verify outcome
            Assert.IsAssignableFrom <IEnumerable <ISpecimenBuilder> >(sut);
            // Teardown
        }
Beispiel #4
0
        public void NonGenericEnumeratorMatchesGenericEnumerator()
        {
            // Arrange
            var sut = new DefaultRelays();
            // Act
            IEnumerable result = sut;

            // Assert
            Assert.True(sut.Select(b => b.GetType()).SequenceEqual(result.Cast <object>().Select(o => o.GetType())));
        }
 public void NonGenericEnumeratorMatchesGenericEnumerator()
 {
     // Fixture setup
     var sut = new DefaultRelays();
     // 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 SutIsMany()
        {
            // Fixture setup
            // Exercise system
            var sut = new DefaultRelays();

            // Verify outcome
            Assert.IsAssignableFrom <IMultiple>(sut);
            // Teardown
        }
        public void NonGenericEnumeratorMatchesGenericEnumerator()
        {
            // Fixture setup
            var sut = new DefaultRelays();
            // 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 SettingCountSetsCountOnManyRelay()
        {
            // Fixture setup
            var sut           = new DefaultRelays();
            var expectedCount = 76;

            // Exercise system
            sut.Count = expectedCount;
            // Verify outcome
            var manyRelay = sut.OfType <MultipleRelay>().Single();

            Assert.Equal(expectedCount, manyRelay.Count);
            // Teardown
        }
        public void CountIsProperWritableProperty()
        {
            // Fixture setup
            var sut           = new DefaultRelays();
            var expectedCount = 912;

            // Exercise system
            sut.Count = expectedCount;
            var result = sut.Count;

            // Verify outcome
            Assert.Equal(expectedCount, result);
            // Teardown
        }
        public void CountMatchesCountOnManyRelay()
        {
            // Fixture setup
            var sut           = new DefaultRelays();
            var expectedCount = 149;

            sut.OfType <MultipleRelay>().Single().Count = expectedCount;
            // Exercise system
            var result = sut.Count;

            // Verify outcome
            Assert.Equal(expectedCount, result);
            // Teardown
        }
Beispiel #11
0
 public void InitializedWithRelaysSutHasCorrectEngineParts()
 {
     // Fixture setup
     var relays = new DefaultRelays();
     var sut = new Fixture(relays);
     // Exercise system
     var result = sut.Engine;
     // Verify outcome
     var expectedParts = from b in relays
                         select b.GetType();
     var composite = Assert.IsAssignableFrom<CompositeSpecimenBuilder>(result);
     Assert.True(expectedParts.SequenceEqual(from b in composite
                                             select b.GetType()));
     // Teardown
 }
Beispiel #12
0
        public void SutHasCorrectContents()
        {
            // Fixture setup
            var expectedBuilderTypes = new[]
            {
                typeof(ArrayRelay),
                typeof(ParameterRequestRelay),
                typeof(PropertyRequestRelay),
                typeof(FieldRequestRelay),
                typeof(FiniteSequenceRelay),
                typeof(SeedIgnoringRelay),
                typeof(MethodInvoker)
            };
            // Exercise system
            var sut = new DefaultRelays();

            // Verify outcome
            Assert.True(expectedBuilderTypes.SequenceEqual(sut.Select(b => b.GetType())));
            // Teardown
        }
 public void SutHasCorrectContents()
 {
     // Fixture setup
     var expectedBuilderTypes = new[]
     {   
         typeof(MultidimensionalArrayRelay),
         typeof(ArrayRelay),
         typeof(ParameterRequestRelay),
         typeof(PropertyRequestRelay),
         typeof(FieldRequestRelay),
         typeof(FiniteSequenceRelay),
         typeof(SeedIgnoringRelay),
         typeof(MethodInvoker)
     };
     // Exercise system
     var sut = new DefaultRelays();
     // Verify outcome
     Assert.True(expectedBuilderTypes.SequenceEqual(sut.Select(b => b.GetType())));
     // Teardown
 }
        public void SutHasCorrectContents()
        {
            // Arrange
            var expectedBuilderTypes = new[]
            {
                typeof(LazyRelay),
                typeof(MultidimensionalArrayRelay),
                typeof(ArrayRelay),
                typeof(ParameterRequestRelay),
                typeof(PropertyRequestRelay),
                typeof(FieldRequestRelay),
                typeof(FiniteSequenceRelay),
                typeof(SeedIgnoringRelay),
                typeof(MethodInvoker)
            };
            // Act
            var sut = new DefaultRelays();

            // Assert
            Assert.True(expectedBuilderTypes.SequenceEqual(sut.Select(b => b.GetType())));
        }
Beispiel #15
0
 public Fixtures(DefaultRelays relays, ICustomization customization)
 {
     _relays        = relays;
     _customization = customization;
 }