public BasketController(ITransactionLibrary transactionLibrary, IMiniBasketService miniBasketService, IUrlService urlService, ICatalogContext catalogContext, ICatalogLibrary catalogLibrary)
 {
     _transactionLibrary = transactionLibrary;
     _miniBasketService  = miniBasketService;
     _urlService         = urlService;
     _catalogContext     = catalogContext;
     _catalogLibrary     = catalogLibrary;
 }
        public BasketControllerTests()
        {
            // Create
            _transactionLibraryInternal = Substitute.For <ITransactionLibrary>();
            _miniBasketService          = Substitute.For <MiniBasketService>(_transactionLibraryInternal);
            _urlService     = Substitute.For <IUrlService>();
            _catalogContext = Substitute.For <ICatalogContext>();
            _catalogLibrary = Substitute.For <ICatalogLibrary>();

            _controller = new BasketController(_transactionLibraryInternal, _miniBasketService, _urlService, _catalogContext, _catalogLibrary);

            _controller.Url = Substitute.For <UrlHelper>();
            _controller.Url.Action(Arg.Any <string>()).Returns("anything");
        }
Beispiel #3
0
 public VariantPickerController(
     IPipeline <IPipelineArgs <GetProductRequest,
                               GetProductResponse> > getProductPipeline,
     ICatalogContext catalogContext,
     ICatalogLibrary catalogLibrary,
     IIndex <Product> productIndex,
     ILocalizationContext localizationContext)
 {
     _getProductPipeline  = getProductPipeline;
     _catalogContext      = catalogContext;
     _catalogLibrary      = catalogLibrary;
     _productIndex        = productIndex;
     _localizationContext = localizationContext;
 }
Beispiel #4
0
        public VariantPickerControllerTests()
        {
            _getProductPipeline = Substitute.For <IPipeline <IPipelineArgs <GetProductRequest, GetProductResponse> > >();
            _catalogContext     = Substitute.For <ICatalogContext>();
            _catalogLibrary     = Substitute.For <ICatalogLibrary>();
            _productIndex       = Substitute.For <IIndex <Product> >();
            // _productIndex.Definition.Returns(new AvenueProductIndexDefinition());
            _localizationContext = Substitute.For <ILocalizationContext>();
            _localizationContext.CurrentCulture.Returns(CultureInfo.GetCultureInfo("en-US"));

            _controller = new VariantPickerController(_getProductPipeline, _catalogContext, _catalogLibrary, _productIndex, _localizationContext);

            _controller.Url = Substitute.For <UrlHelper>();
            _controller.Url.Action(Arg.Any <string>()).Returns("ControllerUrl");
        }
Beispiel #5
0
 public FacetsControllerTests()
 {
     _catalogContext = Substitute.For <ICatalogContext>();
     _catalogLibrary = Substitute.For <ICatalogLibrary>();
     _controller     = new FacetsController(_catalogContext, _catalogLibrary);
 }
Beispiel #6
0
 public CategoryController(ICatalogContext catalogContext, ICatalogLibrary catalogLibrary, IIndex <Product> productIndex)
 {
     _catalogContext = catalogContext;
     _catalogLibrary = catalogLibrary;
     _productIndex   = productIndex;
 }
 public CommerceConnectBasketController(IUrlService urlService, ICatalogContext catalogContext, ICatalogLibrary catalogLibrary)
 {
     _urlService     = urlService;
     _catalogContext = catalogContext;
     _catalogLibrary = catalogLibrary;
 }
 public FacetsController(ICatalogContext catalogContext, ICatalogLibrary catalogLibrary)
 {
     _catalogContext = catalogContext;
     _catalogLibrary = catalogLibrary;
 }
Beispiel #9
0
 public CategoryNavigationController(ICatalogLibrary catalogLibrary, IUrlService urlService, ICatalogContext catalogContext)
 {
     _catalogLibrary = catalogLibrary;
     _urlService     = urlService;
     _catalogContext = catalogContext;
 }