public CatalogSearchServiceImpl( Func <WorkContext> workContextFactory, ICatalogModuleApiClient catalogModuleApi, IInventoryModuleApiClient inventoryModuleApi, ISearchApiModuleApiClient searchApi, IPricingService pricingService, ICustomerService customerService) { _workContextFactory = workContextFactory; _catalogModuleApi = catalogModuleApi; _pricingService = pricingService; _inventoryModuleApi = inventoryModuleApi; _searchApi = searchApi; _customerService = customerService; }
private ISeoRouteService CreateSeoRouteService(ICatalogModuleApiClient catalogApiClient) { var cacheManager = new Mock <ILocalCacheManager>(); //cacheManager.Setup(cache => cache.Get<List<catalogDto.SeoInfo>>(It.IsAny<string>(), It.IsAny<string>())).Returns<List<catalogDto.SeoInfo>>(null); var coreApi = new Mock <ICoreModuleApiClient>(); coreApi .Setup(x => x.Commerce.GetSeoInfoBySlugWithHttpMessagesAsync(It.IsAny <string>(), It.IsAny <Dictionary <string, List <string> > >(), It.IsAny <CancellationToken>())) .Returns <string, Dictionary <string, List <string> >, CancellationToken>(GetSeoInfoBySlugWithHttpMessagesAsync); var result = new SeoRouteService(() => coreApi.Object, () => catalogApiClient, cacheManager.Object); return(result); }
public CatalogSearchServiceImpl( Func <WorkContext> workContextFactory, ICatalogModuleApiClient catalogModuleApi, IInventoryModuleApiClient inventoryModuleApi, IPricingService pricingService, ICustomerService customerService, ISubscriptionModuleApiClient subscriptionApi, IProductAvailabilityService productAvailabilityService) { _workContextFactory = workContextFactory; _catalogModuleApi = catalogModuleApi; _pricingService = pricingService; _inventoryModuleApi = inventoryModuleApi; _customerService = customerService; _subscriptionApi = subscriptionApi; _productAvailabilityService = productAvailabilityService; }