public void Init() { var cmsRegistry = new CmsIocModule(); var dataRegistry = new DataNinectModule(); _container.Register(new List <IRegistry> { cmsRegistry, new ServicesNinjectModule(), dataRegistry }); MenuGen.MenuGen.Init(x => x.Container.Register(new List <IRegistry> { //dataRegistry })); //IocConfig.Configure(_container); AutoMapperConfiguration.Configure(); RazorViewEngineConfig.Configure(); RouteConfig.RegisterRoutes(RouteTable.Routes); //TODO: need to think more about what routes to add to a user's MVC project _templateEngine = (ITemplateEngine)_container.Resolve <ITemplateEngine>(); _templateEngine.GenerateTemplates(Assembly.GetCallingAssembly()); ControllerBuilder.Current.SetControllerFactory(new IocControllerFactory(_container)); }
public void SetupFixture() { _container = new Container(); _container.Register(new List <IRegistry> { new CmsIocModule(), new ServicesNinjectModule(), new DataNinectModule() }); _unitOfWork = _container.Resolve <IUnitOfWork>(); _dbContext = _container.Resolve <IDbContext>(); _sectionTemplateService = _container.Resolve <ISectionTemplateService>(); _pageTemplateService = _container.Resolve <IPageTemplateService>(); _templateEngine = _container.Resolve <ITemplateEngine>(); _assembly = Assembly.GetExecutingAssembly(); DeleteAllSectionTemplates(); }