public void NonSerializableTypesAreHidden() { TestConfigurationNode testnode = new TestConfigurationNode(); MergedConfigurationNode mergedNode = new MergedConfigurationNode(testnode, new ConfigurationNodeMergeData()); PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(mergedNode); Assert.IsNull(properties["NonSerializableProperty"]); }
public void MergedConfigurationNodeHidesNameProperty() { TestConfigurationNode testnode = new TestConfigurationNode(); MergedConfigurationNode mergedNode = new MergedConfigurationNode(testnode, new ConfigurationNodeMergeData()); PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(mergedNode); Assert.IsNull(properties["Name"]); }
public void MergedConfigurationNodeReturnsRegularProperties() { TestConfigurationNode testnode = new TestConfigurationNode(); MergedConfigurationNode mergedNode = new MergedConfigurationNode(testnode, new ConfigurationNodeMergeData()); PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(mergedNode); Assert.IsNotNull(properties["Property1"]); }
public void MergedConfigurationNodeHidesPropertiesMarkedAsNonOverridable() { TestConfigurationNode testnode = new TestConfigurationNode(); MergedConfigurationNode mergedNode = new MergedConfigurationNode(testnode, new ConfigurationNodeMergeData()); PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(mergedNode); Assert.IsNull(properties["OverridesHiddenProperty"]); }
public void MergedConfigurationNodeConvertsToDisplayText() { TestConfigurationNode testnode = new TestConfigurationNode(); MergedConfigurationNode mergedNode = new MergedConfigurationNode(testnode, new ConfigurationNodeMergeData()); TypeConverter converter = TypeDescriptor.GetConverter(mergedNode); string displayText = converter.ConvertToInvariantString(mergedNode); Assert.AreEqual("Don't Override Properties", displayText); }
public void ReturnedPropertiesAreMergedConfigurationProperty() { TestConfigurationNode testnode = new TestConfigurationNode(); MergedConfigurationNode mergedNode = new MergedConfigurationNode(testnode, new ConfigurationNodeMergeData()); PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(mergedNode); Assert.IsNotNull(properties["Property1"]); Assert.AreEqual(typeof(MergedConfigurationProperty), properties["Property1"].GetType()); }