示例#1
0
 public void InitializeWithNullEngineThrows()
 {
     // Fixture setup
     var dummyMany = new FakeMultiple();
     // Exercise system and verify outcome
     Assert.Throws<ArgumentNullException>(() =>
         new Fixture(null, dummyMany));
     // Teardown
 }
示例#2
0
 public void InitializedWithManySutHasCorrectRepeatCount()
 {
     // Fixture setup
     var expectedRepeatCount = 187;
     var dummyBuilder = new DelegatingSpecimenBuilder();
     var many = new FakeMultiple { Count = expectedRepeatCount };
     var sut = new Fixture(dummyBuilder, many);
     // Exercise system
     var result = sut.RepeatCount;
     // Verify outcome
     Assert.Equal(expectedRepeatCount, result);
     // Teardown
 }
示例#3
0
 public void InitializedWithEngineSutHasCorrectEngine()
 {
     // Fixture setup
     var expectedEngine = new DelegatingSpecimenBuilder();
     var dummyMany = new FakeMultiple();
     var sut = new Fixture(expectedEngine, dummyMany);
     // Exercise system
     var result = sut.Engine;
     // Verify outcome
     Assert.Equal(expectedEngine, result);
     // Teardown
 }
示例#4
0
 public void SettingRepeatCountWillCorrectlyUpdateMany()
 {
     // Fixture setup
     var dummyBuilder = new DelegatingSpecimenBuilder();
     var many = new FakeMultiple();
     var sut = new Fixture(dummyBuilder, many);
     // Exercise system
     sut.RepeatCount = 26;
     // Verify outcome
     Assert.Equal(sut.RepeatCount, many.Count);
     // Teardown
 }