public void FindMappingProperties_IncludeBasePropertiesIsTrue()
        {
            var classDefinition = CreateClassDefinition(typeof(DerivedClassWithMappingAttribute));
            var propertyFinder  = new AllMappingPropertiesFinder(
                typeof(DerivedClassWithMappingAttribute),
                true,
                true,
                new ReflectionBasedMemberInformationNameResolver(),
                classDefinition.PersistentMixinFinder,
                new PropertyMetadataReflector());

            var properties = propertyFinder.FindPropertyInfos();

            Assert.That(properties.Length, Is.EqualTo(4));
            Assert.That(
                properties,
                Is.EqualTo(
                    new[]
            {
                GetProperty(typeof(BaseMappingAttributesClass), "Property1"),
                GetProperty(typeof(BaseMappingAttributesClass), "Property4"),
                GetProperty(typeof(DerivedClassWithMappingAttribute), "Property1"),
                GetProperty(typeof(DerivedClassWithMappingAttribute), "Property3")
            }));
        }
        public IEnumerable <MappingValidationResult> Validate(ClassDefinition classDefinition)
        {
            ArgumentUtility.CheckNotNull("classDefinition", classDefinition);

            if (!classDefinition.IsClassTypeResolved)
            {
                throw new InvalidOperationException("Class type of '" + classDefinition.ID + "' is not resolved.");
            }

            bool isInheritanceRoot = classDefinition.BaseClass == null;
            var  propertyFinder    = new AllMappingPropertiesFinder(
                classDefinition.ClassType,
                isInheritanceRoot,
                true,
                _nameResolver,
                classDefinition.PersistentMixinFinder,
                _propertyMetadataProvider);
            var propertyInfos = propertyFinder.FindPropertyInfos();

            return(from IPropertyInformation propertyInfo in propertyInfos
                   select Validate(propertyInfo));
        }