Esempio n. 1
0
        public void DisposeCustomizationDisposesSpecimen()
        {
            // Arrange
            var customization = new DisposableTrackingCustomization();
            var fixture       = new Fixture().Customize(customization);

            var disp = fixture.Create <DisposableSpy>();

            // Act
            customization.Dispose();
            // Assert
            Assert.True(disp.Disposed);
        }
Esempio n. 2
0
        public void DisposeCustomizationDisposesSpecimen()
        {
            // Fixture setup
            var customization = new DisposableTrackingCustomization();
            var fixture       = new Fixture().Customize(customization);

            var disp = fixture.Create <DisposableSpy>();

            // Exercise system
            customization.Dispose();
            // Verify outcome
            Assert.True(disp.Disposed);
            // Teardown
        }