Exemple #1
0
        public void ShouldSerializeValue_Always_DelegateToWrappedPropertyDescriptor()
        {
            // Setup
            var component = new SomeTestClass();
            PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(component);

            PropertyDescriptor getSetProperty = properties[0];
            var wrappedProperty = new ReadOnlyPropertyDescriptorDecorator(getSetProperty);

            // Call
            bool result = wrappedProperty.ShouldSerializeValue(component);

            // Assert
            Assert.AreEqual(getSetProperty.ShouldSerializeValue(component), result);
        }