public void InitTest() { Init(); RenderModelFactory = FakeRenderModelFactory.CreateWithApp(); var frontEndRouteHandler = new RenderRouteHandler(new TestControllerFactory(), UmbracoApplicationContext, RenderModelFactory); //register areas/routes... RouteTable.Routes.Clear(); var packageFolder = new DirectoryInfo(Path.Combine(Common.CurrentAssemblyDirectory, "App_Plugins", PluginManager.PackagesFolderName, "TestPackage")); Components = new ComponentRegistrations(new List <Lazy <MenuItem, MenuItemMetadata> >(), GetEditorMetadata(packageFolder), GetTreeMetadata(packageFolder), GetSurfaceMetadata(packageFolder), new List <Lazy <AbstractTask, TaskMetadata> >(), new List <Lazy <PropertyEditor, PropertyEditorMetadata> >(), new List <Lazy <AbstractParameterEditor, ParameterEditorMetadata> >(), new List <Lazy <DashboardMatchRule, DashboardRuleMetadata> >(), new List <Lazy <DashboardFilter, DashboardRuleMetadata> >(), new List <Lazy <Permission, PermissionMetadata> >(), new List <Lazy <AbstractMacroEngine, MacroEngineMetadata> >()); var componentRegistration = new PackageAreaRegistration(packageFolder, UmbracoApplicationContext, Components); var areaRegistration = new UmbracoAreaRegistration(UmbracoApplicationContext, Components); var installRegistration = new InstallAreaRegistration(UmbracoApplicationContext.Settings); var cmsBootstrapper = new CmsBootstrapper(UmbracoApplicationContext.Settings, areaRegistration, installRegistration, new[] { componentRegistration }, new DefaultAttributeTypeRegistry()); var renderBootstrapper = new RenderBootstrapper(UmbracoApplicationContext, frontEndRouteHandler, RenderModelFactory); //bootstrappers setup the routes cmsBootstrapper.Boot(RouteTable.Routes); renderBootstrapper.Boot(RouteTable.Routes); new UmbracoWebApplication(null, null, null).RegisterRoutes(RouteTable.Routes); }
public void InitTest() { Init(); RenderModelFactory = FakeRenderModelFactory.CreateWithApp(); var frontEndRouteHandler = new RenderRouteHandler(new TestControllerFactory(), RebelApplicationContext, RenderModelFactory); //register areas/routes... RouteTable.Routes.Clear(); var packageFolder = new DirectoryInfo(Path.Combine(Common.CurrentAssemblyDirectory, "App_Plugins", PluginManager.PackagesFolderName, "TestPackage")); Components = new ComponentRegistrations(new List<Lazy<MenuItem, MenuItemMetadata>>(), PluginHelper.GetEditorMetadata(packageFolder), PluginHelper.GetTreeMetadata(packageFolder), PluginHelper.GetSurfaceMetadata(packageFolder), new List<Lazy<AbstractTask, TaskMetadata>>(), new List<Lazy<PropertyEditor, PropertyEditorMetadata>>(), new List<Lazy<AbstractParameterEditor, ParameterEditorMetadata>>(), new List<Lazy<DashboardMatchRule, DashboardRuleMetadata>>(), new List<Lazy<DashboardFilter, DashboardRuleMetadata>>(), new List<Lazy<Permission, PermissionMetadata>>(), new List<Lazy<AbstractMacroEngine, MacroEngineMetadata>>()); var componentRegistration = new PackageAreaRegistration(packageFolder, RebelApplicationContext, Components); var areaRegistration = new RebelAreaRegistration(RebelApplicationContext, Components); var installRegistration = new InstallAreaRegistration(RebelApplicationContext.Settings); var cmsBootstrapper = new CmsBootstrapper(RebelApplicationContext.Settings, areaRegistration, installRegistration, new[] { componentRegistration }, new DefaultAttributeTypeRegistry()); var renderBootstrapper = new RenderBootstrapper(RebelApplicationContext, frontEndRouteHandler, RenderModelFactory); //bootstrappers setup the routes cmsBootstrapper.Boot(RouteTable.Routes); renderBootstrapper.Boot(RouteTable.Routes); RebelWebApplication.RegisterDefaultRoutes(RouteTable.Routes); }