Пример #1
0
        public void SutYieldsCorrectSequence()
        {
            // Arrange
            var dummyWriter = TextWriter.Null;
            var expected    = new DelegatingSpecimenBuilder();
            var tracer      = new DelegatingTracingBuilder(expected);
            var sut         = new TraceWriter(dummyWriter, tracer);

            // Act
            // Assert
            Assert.Equal(expected, sut.Single());
            Assert.Equal(expected, ((System.Collections.IEnumerable)sut).Cast <object>().Single());
        }
Пример #2
0
        public void SutYieldsCorrectSequence()
        {
            // Fixture setup
            var dummyWriter = TextWriter.Null;
            var expected    = new DelegatingSpecimenBuilder();
            var tracer      = new DelegatingTracingBuilder(expected);
            var sut         = new TraceWriter(dummyWriter, tracer);

            // Exercise system
            // Verify outcome
            Assert.Equal(expected, sut.Single());
            Assert.Equal(expected, ((System.Collections.IEnumerable)sut).Cast <object>().Single());
            // Teardown
        }