Beispiel #1
0
 public RenderingService(IContentRepository contentRepository, IWidgetSpecificationRepository widgetSpecificationRepository, IComponentSpecificationLibrary componentLibrary, IPluginContextProvider pluginContextProvider)
 {
     this.contentRepository = contentRepository;
     this.widgetSpecificationRepository = widgetSpecificationRepository;
     this.componentLibrary = componentLibrary;
     this.pluginContextProvider = pluginContextProvider;
 }
Beispiel #2
0
 public RenderingService(IContentRepository contentRepository, IWidgetSpecificationRepository widgetSpecificationRepository, IComponentSpecificationLibrary componentLibrary, IPluginContextProvider pluginContextProvider)
 {
     this.contentRepository             = contentRepository;
     this.widgetSpecificationRepository = widgetSpecificationRepository;
     this.componentLibrary      = componentLibrary;
     this.pluginContextProvider = pluginContextProvider;
 }
Beispiel #3
0
        public void SetUpBase()
        {
            this.ContentRepository = MockRepository.GenerateStub<IContentRepository>();
            this.WidgetSpecificationRepository = MockRepository.GenerateStub<IWidgetSpecificationRepository>();
            this.ComponentLibrary = MockRepository.GenerateStub<IComponentSpecificationLibrary>();
            this.PluginContextProvider = MockRepository.GenerateStub<IPluginContextProvider>();

            this.RenderingService = new RenderingService(
                this.ContentRepository,
                this.WidgetSpecificationRepository,
                this.ComponentLibrary,
                this.PluginContextProvider);
        }
Beispiel #4
0
        public void SetUpBase()
        {
            this.WidgetSpecificationRepository = MockRepository.GenerateMock<IWidgetSpecificationRepository>();
            this.ComponentLibrary = MockRepository.GenerateMock<IComponentSpecificationLibrary>();

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
                    {
                        with.Dependency(this.WidgetSpecificationRepository);
                        with.Dependency(this.ComponentLibrary);
                        with.Dependency<WidgetSpecificationResourceBuilder>();
                        with.ResponseProcessor<WidgetSpecificationJsonResultProcessor>();
                        with.Dependency<WidgetSpecificationService>();
                        with.Module<WidgetSpecificationModule>();
                    });

            this.Browser = new Browser(bootstrapper);
        }
Beispiel #5
0
        public void SetUpBase()
        {
            this.ContentRepository = MockRepository.GenerateMock<IContentRepository>();
            this.ComponentLibrary = MockRepository.GenerateMock<IComponentSpecificationLibrary>();
            this.WidgetRepository = MockRepository.GenerateMock<IWidgetSpecificationRepository>();
            this.RendererFactory = MockRepository.GenerateMock<IRendererFactory>();
            this.PluginContextProvider = MockRepository.GenerateStub<IPluginContextProvider>();

            this.SetUpAtom("atom1");
            this.SetUpContainer("container1");

            var bootstrapper = new ConfigurableBootstrapper(
                with =>
                    {
                        with.Dependency(this.ContentRepository);
                        with.Dependency(this.ComponentLibrary);
                        with.Dependency(this.WidgetRepository);
                        with.Dependency(this.PluginContextProvider);
                        with.ResponseProcessor<PageInstanceResultProcessor>();
                        with.ResponseProcessor<ComponentInstanceResultProcessor>();
                        with.Dependency<RenderingService>();
                        with.Module<RenderingModule>();
                        with.ViewEngine<RazorViewEngine>();
                        with.ViewLocationProvider<ResourceViewLocationProvider>();

                        ResourceViewLocationProvider.RootNamespaces.Clear();
                        ResourceViewLocationProvider.RootNamespaces.Add(typeof(KolaNancyBootstrapper).Assembly, "Kola.Nancy");
                        ResourceViewLocationProvider.RootNamespaces.Add(typeof(ContextBase).Assembly, "Integration.Tests.Nancy.Modules.RenderingModuleTests.Views");
                    });

            KolaConfigurationRegistry.RegisterRenderer(new MultiRenderer(this.RendererFactory));

            bootstrapper.BeforeRequest = FakeOwinEnvironment();

            this.Browser = new Browser(bootstrapper);
        }
 public ComponentSpecificationLibrary(IKolaConfigurationRegistry registry, IWidgetSpecificationRepository widgetRepository)
 {
     this.registry         = registry;
     this.widgetRepository = widgetRepository;
 }
 public WidgetSpecificationService(IWidgetSpecificationRepository widgetSpecificationRepository, IComponentSpecificationLibrary componentLibrary)
 {
     this.widgetSpecificationRepository = widgetSpecificationRepository;
     this.componentLibrary = componentLibrary;
 }
 public WidgetSpecificationService(IWidgetSpecificationRepository widgetSpecificationRepository, IComponentSpecificationLibrary componentLibrary)
 {
     this.widgetSpecificationRepository = widgetSpecificationRepository;
     this.componentLibrary = componentLibrary;
 }
 public ComponentSpecificationLibrary(IKolaConfigurationRegistry registry, IWidgetSpecificationRepository widgetRepository)
 {
     this.registry = registry;
     this.widgetRepository = widgetRepository;
 }