예제 #1
0
 public void CustomizeReturnsCorrectResult()
 {
     // Fixture setup
     var sut = new Fixture();
     var dummyCustomization = new DelegatingCustomization();
     // Exercise system
     var result = sut.Customize(dummyCustomization);
     // Verify outcome
     Assert.Equal(sut, result);
     // Teardown
 }
예제 #2
0
        public void CustomizeCorrectlyAppliesCustomization()
        {
            // Fixture setup
            var sut = new Fixture();

            var verified = false;
            var customization = new DelegatingCustomization { OnCustomize = f => verified = f == sut };
            // Exercise system
            sut.Customize(customization);
            // Verify outcome
            Assert.True(verified, "Mock verified");
            // Teardown
        }