public void CreateWithNullContainerDoesNotThrow()
        {
            // Arrange
            var sut = new DoubleSequenceGenerator();
            // Act
            var dummyRequest = new object();

            sut.Create(dummyRequest, null);
            // Assert (no exception indicates success)
        }
        public void CreateWithNullContainerDoesNotThrow()
        {
            // Fixture setup
            var sut = new DoubleSequenceGenerator();
            // Exercise system
            var dummyRequest = new object();

            sut.Create(dummyRequest, null);
            // Verify outcome (no exception indicates success)
            // Teardown
        }
        public void CreateWithNullRequestWillReturnCorrectResult()
        {
            // Arrange
            var sut = new DoubleSequenceGenerator();
            // Act
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(null, dummyContainer);

            // Assert
            Assert.Equal(new NoSpecimen(), result);
        }
        public void CreateWithNullRequestWillReturnCorrectResult()
        {
            // Fixture setup
            var sut = new DoubleSequenceGenerator();
            // Exercise system
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(null, dummyContainer);

            // Verify outcome
            Assert.Equal(new NoSpecimen(), result);
            // Teardown
        }
        public void CreateWithDoubleRequestWillReturnCorrectResult()
        {
            // Arrange
            var doubleRequest = typeof(double);
            var sut           = new DoubleSequenceGenerator();
            // Act
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(doubleRequest, dummyContainer);

            // Assert
            Assert.Equal(1d, result);
        }
        public void CreateWithNonDoubleRequestWillReturnCorrectResult()
        {
            // Arrange
            var nonDoubleRequest = new object();
            var sut = new DoubleSequenceGenerator();
            // Act
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(nonDoubleRequest, dummyContainer);
            // Assert
            var expectedResult = new NoSpecimen();

            Assert.Equal(expectedResult, result);
        }
Exemple #7
0
        public void CreateWithNonDoubleRequestWillReturnCorrectResult()
        {
            // Fixture setup
            var nonDoubleRequest = new object();
            var sut = new DoubleSequenceGenerator();
            // Exercise system
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(nonDoubleRequest, dummyContainer);

            // Verify outcome
#pragma warning disable 618
            var expectedResult = new NoSpecimen(nonDoubleRequest);
#pragma warning restore 618
            Assert.Equal(expectedResult, result);
            // Teardown
        }