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)); }