示例#1
0
 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;
 }
示例#2
0
        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);
        }
示例#3
0
 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;
 }