public void GetPrimitiveProperty_should_return_correct_property()
        {
            var complexType = new EdmComplexType();
            var property = complexType.AddPrimitiveProperty("Foo");

            var foundProperty = complexType.GetPrimitiveProperty("Foo");

            Assert.NotNull(foundProperty);
            Assert.Same(property, foundProperty);
        }
        public void Map_should_map_complex_type_properties()
        {
            var complexType = new EdmComplexType();
            var mappingContext
                = new MappingContext(new ModelConfiguration(), new ConventionsConfiguration(), new EdmModel().Initialize());

            new PropertyMapper(new TypeMapper(mappingContext))
                .Map(new MockPropertyInfo(typeof(int), "Foo"), complexType, () => new ComplexTypeConfiguration(typeof(object)));

            Assert.Equal(1, complexType.DeclaredProperties.Count);

            var property = complexType.GetPrimitiveProperty("Foo");

            Assert.Equal(EdmPrimitiveType.Int32, property.PropertyType.PrimitiveType);
        }