public void ShouldPopulateModelProviderPropertyWhenCreateIsCalledWithModelProviderArgument()
 {
     var jsonModelProvider = new JsonModelProvider();
     var builder = (ModelBuilder)_factory.Create(jsonModelProvider);
     dynamic dataContext = builder.DataContext;
     Assert.AreSame(jsonModelProvider, dataContext.ModelProvider);
 }
Example #2
0
        public void ShouldInstantiateModelBuilderByModelProviderOfSameNameExcludingModelProviderSuffix()
        {
            var jsonModelProvider = new JsonModelProvider();
            var builder           = _factory.Create(jsonModelProvider);

            Assert.IsInstanceOfType(builder, typeof(JsonModelBuilder));
        }
Example #3
0
        public void ShouldPopulateModelProviderPropertyWhenCreateIsCalledWithModelProviderArgument()
        {
            var     jsonModelProvider = new JsonModelProvider();
            var     builder           = (ModelBuilder)_factory.Create(jsonModelProvider);
            dynamic dataContext       = builder.DataContext;

            Assert.AreSame(jsonModelProvider, dataContext.ModelProvider);
        }
 public void ShouldInstantiateModelBuilderByModelProviderOfSameNameExcludingModelProviderSuffix()
 {
     var jsonModelProvider = new JsonModelProvider();
     var builder = _factory.Create(jsonModelProvider);
     Assert.IsInstanceOfType(builder, typeof(JsonModelBuilder));
 }