public void ShouldWriteProperties()
        {
            var mapping = new JoinedSubclassMapping();

            mapping.AddProperty(new PropertyMapping());

            writer.VerifyXml(mapping)
            .Element("property").Exists();
        }
        ISubclassMapping ISubclassMappingProvider.GetSubclassMapping()
        {
            var mapping = new JoinedSubclassMapping(attributes.CloneInner());

            mapping.Key = new KeyMapping {
                ContainingEntityType = typeof(TSubclass)
            };
            mapping.Name = typeof(TSubclass).AssemblyQualifiedName;
            mapping.Type = typeof(TSubclass);

            foreach (var column in columns)
            {
                mapping.Key.AddColumn(column);
            }

            foreach (var property in properties)
            {
                mapping.AddProperty(property.GetPropertyMapping());
            }

            foreach (var component in components)
            {
                mapping.AddComponent(component.GetComponentMapping());
            }

            foreach (var oneToOne in oneToOnes)
            {
                mapping.AddOneToOne(oneToOne.GetOneToOneMapping());
            }

            foreach (var collection in collections)
            {
                mapping.AddCollection(collection.GetCollectionMapping());
            }

            foreach (var reference in references)
            {
                mapping.AddReference(reference.GetManyToOneMapping());
            }

            foreach (var any in anys)
            {
                mapping.AddAny(any.GetAnyMapping());
            }

            return(mapping);
        }
 public void PropertiesCollectionHasSameCountAsMapping()
 {
     mapping.AddProperty(new PropertyMapping());
     inspector.Properties.Count().ShouldEqual(1);
 }
        public void ShouldWriteProperties()
        {
            var mapping = new JoinedSubclassMapping();

            mapping.AddProperty(new PropertyMapping());

            writer.VerifyXml(mapping)
                .Element("property").Exists();
        }