예제 #1
0
        public void CreateWithNullContainerDoesNotThrow()
        {
            // Arrange
            var sut = new UInt32SequenceGenerator();
            // Act
            var dummyRequest = new object();

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

            sut.Create(dummyRequest, null);
            // Verify outcome (no exception indicates success)
            // Teardown
        }
예제 #3
0
        public void CreateWithNullRequestWillReturnCorrectResult()
        {
            // Arrange
            var sut = new UInt32SequenceGenerator();
            // 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 UInt32SequenceGenerator();
            // Exercise system
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(null, dummyContainer);

            // Verify outcome
            Assert.Equal(new NoSpecimen(), result);
            // Teardown
        }
예제 #5
0
        public void CreateWithUInt32RequestWillReturnCorrectResult()
        {
            // Arrange
            var uInt32Request = typeof(uint);
            var sut           = new UInt32SequenceGenerator();
            // Act
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(uInt32Request, dummyContainer);

            // Assert
            Assert.Equal(1u, result);
        }
예제 #6
0
        public void CreateWithNonUInt32RequestWillReturnCorrectResult()
        {
            // Arrange
            var nonUInt32Request = new object();
            var sut = new UInt32SequenceGenerator();
            // Act
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(nonUInt32Request, dummyContainer);
            // Assert
            var expectedResult = new NoSpecimen();

            Assert.Equal(expectedResult, result);
        }
        public void CreateWithNonUInt32RequestWillReturnCorrectResult()
        {
            // Fixture setup
            var nonUInt32Request = new object();
            var sut = new UInt32SequenceGenerator();
            // Exercise system
            var dummyContainer = new DelegatingSpecimenContext();
            var result         = sut.Create(nonUInt32Request, dummyContainer);

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