public void CheckMappedOfSimpleEntityWithMetadaAttribute() { var mappedType = TypeMapperFactory.CreateByConventions().Map<PersonWithMetadata>(); mappedType.Source.Should().Be.EqualTo(typeof(PersonWithMetadata)); mappedType.Mapped.Should().Be.EqualTo(typeof(PersonMetadata)); var primitiveProperty = mappedType.Primitives.Single(); var reflector = new TypeReflector<PersonWithMetadata>(); primitiveProperty.Name.Should().Be.EqualTo(reflector.PropertyName(x => x.Name)); primitiveProperty.Required.Should("The required attribute was not recognized.").Be.True(); mappedType.Collections.Single() .Name.Should().Be.EqualTo(reflector.PropertyName(x => x.Addresses)); mappedType.References.Single() .Name.Should().Be.EqualTo(reflector.PropertyName(x => x.Parent)); }