public void IsNonCustomExpandableObjectProperty_PropertyWithSomeTypeConverter_ReturnFalse() { // Setup var target = new ClassWithProperties(); var propertySpec = new PropertySpec(target.GetType().GetProperty("StringPropertyWithSomeTypeConverter")); // Call bool hasExpandableObjectTypeConverter = propertySpec.IsNonCustomExpandableObjectProperty(); // Assert Assert.False(hasExpandableObjectTypeConverter); }
public void IsNonCustomExpandableObjectProperty_ExpandableObjectConverterInherited_ReturnTrue() { // Setup var target = new InheritorSettingPropertyToNotBrowsable(); var propertySpec = new PropertySpec(target.GetType().GetProperty("StringPropertyWithExpandableObjectConverter")); // Call bool hasExpandableObjectTypeConverter = propertySpec.IsNonCustomExpandableObjectProperty(); // Assert Assert.True(hasExpandableObjectTypeConverter); }
public void IsNonCustomExpandableObjectProperty_PropertyWithCustomExpandableObjectTypeConverter_ReturnFalse() { // Setup var target = new ClassWithProperties(); var propertySpec = new PropertySpec(target.GetType().GetProperty("StringPropertyWithCustomExpandableObjectConverter")); // Call bool hasExpandableObjectTypeConverter = propertySpec.IsNonCustomExpandableObjectProperty(); // Assert Assert.False(hasExpandableObjectTypeConverter, "As we cannot copy the same behavior of a ExpandableObjectConverter with customizations, we should not recognize it as such."); }