public void ApplyPropertyConfiguration_should_run_property_configuration_conventions()
        {
            var mockConvention           = new Mock <IConfigurationConvention <PropertyInfo, Properties.Primitive.StringPropertyConfiguration> >();
            var conventionsConfiguration = new ConventionsConfiguration(new[] { mockConvention.Object });
            var mockPropertyInfo         = new MockPropertyInfo(typeof(string), "S");

            conventionsConfiguration.ApplyPropertyConfiguration(mockPropertyInfo, () => new Properties.Primitive.StringPropertyConfiguration());

            mockConvention.Verify(c => c.Apply(mockPropertyInfo, It.IsAny <Func <Properties.Primitive.StringPropertyConfiguration> >()), Times.AtMostOnce());
        }
        public void ApplyPropertyConfiguration_should_run_property_model_conventions()
        {
            var mockConvention           = new Mock <IConfigurationConvention <PropertyInfo, ModelConfiguration> >();
            var conventionsConfiguration = new ConventionsConfiguration(
                new IConvention[] { mockConvention.Object });
            var mockPropertyInfo   = new MockPropertyInfo(typeof(object), "N");
            var modelConfiguration = new ModelConfiguration();

            conventionsConfiguration.ApplyPropertyConfiguration(mockPropertyInfo, modelConfiguration);

            mockConvention.Verify(c => c.Apply(mockPropertyInfo, It.IsAny <Func <ModelConfiguration> >()), Times.AtMostOnce());
        }
        public void ApplyPropertyConfiguration_should_run_navigation_property_configuration_conventions()
        {
            var mockConvention1          = new Mock <IConfigurationConvention <PropertyInfo, PropertyConfiguration> >();
            var mockConvention2          = new Mock <IConfigurationConvention <PropertyInfo, NavigationPropertyConfiguration> >();
            var conventionsConfiguration = new ConventionsConfiguration(
                new IConvention[] { mockConvention1.Object, mockConvention2.Object });
            var mockPropertyInfo = new MockPropertyInfo(typeof(object), "N");

            conventionsConfiguration.ApplyPropertyConfiguration(
                mockPropertyInfo,
                () => new NavigationPropertyConfiguration(mockPropertyInfo));

            mockConvention1.Verify(c => c.Apply(mockPropertyInfo, It.IsAny <Func <PropertyConfiguration> >()), Times.AtMostOnce());
            mockConvention2.Verify(c => c.Apply(mockPropertyInfo, It.IsAny <Func <NavigationPropertyConfiguration> >()), Times.AtMostOnce());
        }