public static ODataConventionModelBuilder CreateWithTypes(bool isQueryCompositionMode, params Type[] types)
        {
            MockAssembly         assembly = new MockAssembly(types);
            MockAssemblyResolver resolver = new MockAssemblyResolver(assembly);

            return(new ODataConventionModelBuilder(resolver, isQueryCompositionMode));
        }
        public static ODataConventionModelBuilder CreateWithTypes(params Type[] types)
        {
            MockAssembly         assembly = new MockAssembly(types);
            MockAssemblyResolver resolver = new MockAssemblyResolver(assembly);

            return(new ODataConventionModelBuilder(resolver));
        }
        public static ODataConventionModelBuilder MockConventionModelBuilder(params Type[] types)
        {
            MockAssembly         assembly           = new MockAssembly(types);
            MockAssemblyResolver resolver           = new MockAssemblyResolver(assembly);
            Mock <ODataConventionModelBuilder> mock = new Mock <ODataConventionModelBuilder>(resolver);

            mock.Setup(b => b.ValidateModel(It.IsAny <IEdmModel>())).Callback(() => { });
            mock.CallBase = true;
            return(mock.Object);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ODataConventionModelBuilder"/> class.
        /// </summary>
        /// <returns>A new instance of the <see cref="ODataConventionModelBuilder"/> class.</returns>
        public static ODataConventionModelBuilder Create(bool isQueryCompositionMode)
        {
            MockAssemblyResolver resolver = new MockAssemblyResolver(
                typeof(ODataConventionModelBuilder).Assembly,
                typeof(ODataConventionModelBuilderFactory).Assembly,

                // Also, a few tests are built on CultureInfo so include it as well.
                typeof(CultureInfo).Assembly
                );

            return(new ODataConventionModelBuilder(resolver, isQueryCompositionMode));
        }