コード例 #1
0
 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
 }
コード例 #2
0
 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
 }
コード例 #3
0
        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
        }