Ejemplo n.º 1
0
 public LoginController(IContentRepository contentRepository, ISiteSettingsProvider siteConfiguration, UrlResolver urlResolver, LocalizationService localizationService)
 {
     _contentRepository   = contentRepository;
     _siteConfiguration   = siteConfiguration;
     _urlResolver         = urlResolver;
     _localizationService = localizationService;
 }
        // private readonly ViewModelFactory _modelFactory;

        /// <summary>
        /// Initializes a new instance of the <see cref="PageContextActionFilter"/> class.
        /// </summary>
        public PageContextActionFilter(IContentLoader contentLoader, UrlResolver urlResolver, ILanguageBranchRepository languageBranchRepository, ISiteSettingsProvider siteConfiguration)
        {
            _contentLoader            = contentLoader;
            _urlResolver              = urlResolver;
            _languageBranchRepository = languageBranchRepository;
            _siteConfiguration        = siteConfiguration;
        }
Ejemplo n.º 3
0
        public ProductColorMappingsServicesTests()
        {
            this.siteSettingsProvider = Substitute.For <ISiteSettingsProvider>();
            this.service = new ProductColorMappingsServices(this.siteSettingsProvider);

            this.fixture = new Fixture();
        }
 // private readonly ViewModelFactory _modelFactory;
 /// <summary>
 /// Initializes a new instance of the <see cref="PageContextActionFilter"/> class.
 /// </summary>
 public PageContextActionFilter(IContentLoader contentLoader, UrlResolver urlResolver, ILanguageBranchRepository languageBranchRepository, ISiteSettingsProvider siteConfiguration)
 {
     _contentLoader = contentLoader;
     _urlResolver = urlResolver;
     _languageBranchRepository = languageBranchRepository;
     _siteConfiguration = siteConfiguration;
 }
Ejemplo n.º 5
0
        public SiteSettingsProviderTests()
        {
            this.siteDefinitionsProvider = Substitute.For <ISiteDefinitionsProvider>();
            this.sitecoreService         = Substitute.For <ISitecoreService>();

            this.provider = new SiteSettingsProvider(this.siteDefinitionsProvider, this.sitecoreService);
        }
Ejemplo n.º 6
0
 public InternalGraphQueryCache(IQueryService queryService, IRepository repo, IGraphBuilder graphBuilder, ILog log, ISiteSettingsProvider siteSettings)
 {
     _queryService = queryService;
     _repo         = repo;
     _graphBuilder = graphBuilder;
     _log          = log;
     _siteSettings = siteSettings;
 }
Ejemplo n.º 7
0
        public ImageFallbackContextProcessor(
            IConfigurationResolver configurationResolver,
            ISiteSettingsProvider siteSettingsProvider) : base(configurationResolver)
        {
            Assert.ArgumentNotNull(siteSettingsProvider, nameof(siteSettingsProvider));

            this.siteSettingsProvider = siteSettingsProvider;
        }
Ejemplo n.º 8
0
 public GenericPaymentController(IContentRepository contentRepository, IOrderService orderService, IPaymentCompleteHandler paymentCompleteHandler, ISiteSettingsProvider siteConfiguration, ICurrentMarket currentMarket)
 {
     _contentRepository      = contentRepository;
     _orderService           = orderService;
     _siteConfiguration      = siteConfiguration;
     _paymentCompleteHandler = paymentCompleteHandler;
     _currentMarket          = currentMarket;
 }
 public RobotsFileRequestProcessor(
     ISitecoreContext sitecoreContext,
     ISiteSettingsProvider siteSettingsProvider,
     IRobotsViewModelBuilder robotsViewModelBuilder
     )
 {
     this._sitecoreContext        = sitecoreContext;
     this._siteSettingsProvider   = siteSettingsProvider;
     this._robotsViewModelBuilder = robotsViewModelBuilder;
 }
Ejemplo n.º 10
0
 public SearchService(
     IGlobalSearchRepository globalSearchRepository,
     IRenderingPropertiesRepository renderingPropertiesRepository,
     ISitecoreContext sitecoreContext,
     ISiteSettingsProvider siteSettingsProvider)
 {
     this.globalSearchRepository        = globalSearchRepository;
     this.renderingPropertiesRepository = renderingPropertiesRepository;
     this.sitecoreContext      = sitecoreContext;
     this.siteSettingsProvider = siteSettingsProvider;
 }
Ejemplo n.º 11
0
 public StoreService(
     ISitecoreContext sitecoreContext,
     IStoreSearchRepository storeSearchRepository,
     IRenderingPropertiesRepository renderingPropertiesRepository,
     ISiteSettingsProvider siteSettingsProvider)
 {
     this.sitecoreContext               = sitecoreContext;
     this.storeSearchRepository         = storeSearchRepository;
     this.renderingPropertiesRepository = renderingPropertiesRepository;
     this.siteSettingsProvider          = siteSettingsProvider;
 }
 public GenericPaymentController(
     IContentRepository contentRepository,
     IOrderService orderService,
     IPaymentCompleteHandler paymentCompleteHandler,
     ISiteSettingsProvider siteConfiguration,
     ICurrentMarket currentMarket,
     ILogger logger,
     IMetricsLoggingService metricsLoggingService,
     IRecommendationService recommendationService)
 {
     _contentRepository      = contentRepository;
     _orderService           = orderService;
     _siteConfiguration      = siteConfiguration;
     _paymentCompleteHandler = paymentCompleteHandler;
     _currentMarket          = currentMarket;
     _logger = logger;
     _metricsLoggingService = metricsLoggingService;
     _recommendationService = recommendationService;
 }
        public void GetDatasources_ShouldReturnSourcesFromSettingItem([Frozen] ISiteSettingsProvider siteSettingsProvider, [Greedy] DatasourceProvider provider, string name, Item contextItem, Db db, string settingItemName, Item item, DbItem sourceRoot)
        {
            var settingId = ID.NewID;

            db.Add(new DbItem(settingItemName, settingId, Templates.DatasourceConfiguration.ID)
            {
                new DbField(Templates.DatasourceConfiguration.Fields.DatasourceLocation)
                {
                    { "en", sourceRoot.ID.ToString() }
                }
            });
            db.Add(sourceRoot);
            var sourceRootItem = db.GetItem(sourceRoot.ID);
            var settingItem    = db.GetItem(settingId);

            siteSettingsProvider.GetSetting(Arg.Any <Item>(), Arg.Any <string>(), Arg.Any <string>()).Returns(settingItem);
            var sources = provider.GetDatasourceLocations(item, name);

            sources.Should().NotBeNull();
            sources.Should().Contain(sourceRootItem);
        }
Ejemplo n.º 14
0
 public RecipesController(
     ICookingProcedureProvider cookingProcedureProvider,
     IIngredientProvider ingredientProvider,
     IIngredientMapper ingredientMapper,
     IRecipeProvider recipeProvider,
     IRecipeMapper recipeMapper,
     IPdfGenerator pdfGenerator,
     IScraper scraper,
     IRecipeParser RecipeParser,
     ISiteSettingsProvider siteSettingsProvider,
     IFileHandler fileHandler
     )
 {
     this.cookingProcedureProvider = cookingProcedureProvider;
     this.ingredientProvider       = ingredientProvider;
     this.ingredientMapper         = ingredientMapper;
     this.recipeProvider           = recipeProvider;
     this.recipeMapper             = recipeMapper;
     this.pdfGenerator             = pdfGenerator;
     this.scraper              = scraper;
     this.RecipeParser         = RecipeParser;
     this.siteSettingsProvider = siteSettingsProvider;
     this.fileHandler          = fileHandler;
 }
 public ReceiptViewModelBuilder(IContentRepository contentRepository, ISiteSettingsProvider siteConfiguration, ICurrentMarket currentMarket)
 {
     _contentRepository = contentRepository;
     _siteConfiguration = siteConfiguration;
     _currentMarket = currentMarket;
 }
 public ReceiptViewModelBuilder(IContentRepository contentRepository, ISiteSettingsProvider siteConfiguration, ICurrentMarket currentMarket)
 {
     _contentRepository = contentRepository;
     _siteConfiguration = siteConfiguration;
     _currentMarket     = currentMarket;
 }
Ejemplo n.º 17
0
 public DatasourceProvider(ISiteSettingsProvider siteSettingsProvider)
 {
   this.siteSettingsProvider = siteSettingsProvider;
 }
        public void GetDatasourceTemplate_ShouldReturnNull(ISiteSettingsProvider siteSettingsProvider, DatasourceProvider provider, string settingName, Item contextItem)
        {
//      var provider = new ItemDatasourceProvider(settingsProvider);
            //var template = provider.GetDatasourceTemplate(settingName, contextItem);
        }
Ejemplo n.º 19
0
 public OrderSettingsFromSettingsBlock(ISiteSettingsProvider settings)
 {
     _settings = settings;
 }
Ejemplo n.º 20
0
    public void GetDatasourceTemplate_ShouldReturnNull(ISiteSettingsProvider siteSettingsProvider, DatasourceProvider provider, string settingName, Item contextItem)
    {
//      var provider = new ItemDatasourceProvider(settingsProvider);
      //var template = provider.GetDatasourceTemplate(settingName, contextItem);
    }
 public OrderSettingsFromSettingsBlock(ISiteSettingsProvider settings)
 {
     _settings = settings;
 }
        public void GetDatasources_LocationSetByRelativePath_ShouldReturnSourcesFromSettingItem([Frozen] ISiteSettingsProvider siteSettingsProvider, [Greedy] DatasourceProvider provider, string name, string contextItemName, Db db, string settingItemName, Item item, string sourceRootName)
        {
            var contextItemId = ID.NewID;
            var contextDbItem = new DbItem(contextItemName.Replace("-", String.Empty), contextItemId);

            var rootName   = sourceRootName.Replace("-", string.Empty);
            var sourceRoot = new DbItem(rootName);

            contextDbItem.Add(sourceRoot);
            db.Add(contextDbItem);
            var settingId     = ID.NewID;
            var settingDbItem = new DbItem(settingItemName.Replace("-", String.Empty), settingId, Templates.DatasourceConfiguration.ID)
            {
                new DbField(Templates.DatasourceConfiguration.Fields.DatasourceLocation)
                {
                    {
                        "en", $"./{rootName}"
                    }
                }
            };
            var contextItem = db.GetItem(contextItemId);

            db.Add(settingDbItem);
            var sourceRootItem = db.GetItem(sourceRoot.ID);
            var settingItem    = db.GetItem(settingId);

            siteSettingsProvider.GetSetting(Arg.Any <Item>(), Arg.Any <string>(), Arg.Any <string>()).Returns(settingItem);
            var sources = provider.GetDatasourceLocations(contextItem, name);

            sources.Should().NotBeNull();
            sources.Should().Contain(sourceRootItem);
        }
Ejemplo n.º 23
0
 public DatasourceProvider(ISiteSettingsProvider siteSettingsProvider)
 {
     this.siteSettingsProvider = siteSettingsProvider;
 }
Ejemplo n.º 24
0
 public ProductColorMappingsServices(ISiteSettingsProvider siteSettingsProvider)
 {
     this.siteSettingsProvider = siteSettingsProvider;
 }