private bool HasValidationRulesOnProperty(PropertyInfo property)
        {
            var reflector = new ValidationAttributesBasedPropertyRuleReflector(property);

            return(reflector.GetAddingPropertyValidators().Any() ||
                   reflector.GetHardConstraintPropertyValidators().Any() ||
                   reflector.GetRemovingPropertyRegistrations().Any());
        }
        public void SetUp()
        {
            _customerLastNameProperty        = typeof(Customer).GetProperty("UserName");
            _specialCustomerLastNameProperty = typeof(SpecialCustomer1).GetProperty("UserName");
            _addressPostalCodeProperty       = typeof(Address).GetProperty("PostalCode");

            _customerPropertyReflector        = new ValidationAttributesBasedPropertyRuleReflector(_customerLastNameProperty);
            _specialCustomerPropertyReflector = new ValidationAttributesBasedPropertyRuleReflector(_specialCustomerLastNameProperty);
            _addressPropertyReflector         = new ValidationAttributesBasedPropertyRuleReflector(_addressPostalCodeProperty);
        }