Ejemplo n.º 1
0
        public void Dispose_AlreadyDisposed_DoesNotThrowException()
        {
            // Setup
            var mockRepository   = new MockRepository();
            var propertyResolver = mockRepository.Stub <IPropertyResolver>();

            mockRepository.ReplayAll();

            // Call
            TestDelegate call = () =>
            {
                using (var control = new PropertyGridView(propertyResolver))
                {
                    control.Dispose();
                }
            };

            // Assert
            Assert.DoesNotThrow(call);
            mockRepository.VerifyAll();
        }