public void CreateWithNullContextDoesNotThrow()
        {
            // Arrange
            var sut          = new UriSchemeGenerator();
            var dummyRequest = new object();

            // Act & assert
            Assert.Null(Record.Exception(() => sut.Create(dummyRequest, null)));
        }
示例#2
0
        public void CreateWithNullContextDoesNotThrow()
        {
            // Fixture setup
            var sut          = new UriSchemeGenerator();
            var dummyRequest = new object();

            // Exercise system and verify outcome
            Assert.DoesNotThrow(() => sut.Create(dummyRequest, null));
            // Teardown
        }
        public void CreateWithNullRequestReturnsCorrectResult()
        {
            // Arrange
            var sut = new UriSchemeGenerator();
            // Act
            var dummyContext = new DelegatingSpecimenContext();
            var result       = sut.Create(null, dummyContext);

            // Assert
            Assert.Equal(new NoSpecimen(), result);
        }
示例#4
0
        public void CreateWithNullRequestReturnsCorrectResult()
        {
            // Fixture setup
            var sut = new UriSchemeGenerator();
            // Exercise system
            var dummyContext = new DelegatingSpecimenContext();
            var result       = sut.Create(null, dummyContext);

            // Verify outcome
            Assert.Equal(new NoSpecimen(), result);
            // Teardown
        }
        public void CreateWithUriSchemeRequestReturnsCorrectResult()
        {
            // Arrange
            var sut     = new UriSchemeGenerator();
            var request = typeof(UriScheme);
            // Act
            var dummyContext = new DelegatingSpecimenContext();
            var result       = sut.Create(request, dummyContext);
            // Assert
            var expectedResult = new UriScheme();

            Assert.Equal(expectedResult, result);
        }
示例#6
0
        public void CreateWithUriSchemeRequestReturnsCorrectResult()
        {
            // Fixture setup
            var sut     = new UriSchemeGenerator();
            var request = typeof(UriScheme);
            // Exercise system
            var dummyContext = new DelegatingSpecimenContext();
            var result       = sut.Create(request, dummyContext);
            // Verify outcome
            var expectedResult = new UriScheme();

            Assert.Equal(expectedResult, result);
            // Teardown
        }
示例#7
0
        public void CreateWithNonUriSchemeRequestReturnsCorrectResult()
        {
            // Fixture setup
            var sut          = new UriSchemeGenerator();
            var dummyRequest = new object();
            // Exercise system
            var dummyContext = new DelegatingSpecimenContext();
            var result       = sut.Create(dummyRequest, dummyContext);

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