public HumanController(IManagerServices managerServices, ICustomerServices customerServices, ICartServices cartServices)
 {
     this.customerServices = customerServices;
     this.cartServices     = cartServices;
     this.managerServices  = managerServices;
 }
 public CartController(ICartServices cartService)
 {
     this.cartService = cartService;
 }
 public GetCarthandler(ICartServices cartServices)
 {
     _cartServices = cartServices;
 }
Ejemplo n.º 4
0
 public CartController(ICartServices CartServisces)
 {
     _CartServisces = CartServisces;
 }
 public CartController(ICartServices services)
 {
     _services = services;
 }
Ejemplo n.º 6
0
 public CartController(ICartServices cartServices) => _cartServices = cartServices;
 public CheckoutCartHandler(ICartServices cartServices)
 {
     _cartServices = cartServices;
 }
Ejemplo n.º 8
0
 public CartApiController()
 {
     _CartServices = new CartServices();
 }
 public AddCartItemHandler(ICartServices cartServices)
 {
     _cartServices = cartServices;
 }
Ejemplo n.º 10
0
 public CartViewComponent(ICartServices CartServices) => _CartServices = CartServices;
 public CartController(ICartServices _cartServices)
 {
     this.cartServices = _cartServices;
 }
Ejemplo n.º 12
0
 public OrdersController(IOrderServices orderServices, IProductServices productServices, ICartServices cartServices)
 {
     this.orderServices   = orderServices;
     this.productServices = productServices;
     this.cartServices    = cartServices;
 }
Ejemplo n.º 13
0
 public CartController(ICartServices cartService, IHttpContextAccessor httpContextAccessor)
 {
     _cartService         = cartService;
     _httpContextAccessor = httpContextAccessor;
 }
Ejemplo n.º 14
0
 public CartController(ICartServices CartServices) => _CartServices = CartServices;
Ejemplo n.º 15
0
 public CartViewComponent(ICartServices cartServices) => _cartServices = cartServices;
Ejemplo n.º 16
0
 public CartController(ICartServices cartServices, IHttpContextAccessor httpContextAccessor)
 {
     this.cartServices        = cartServices;
     this.httpContextAccessor = httpContextAccessor;
 }
Ejemplo n.º 17
0
 public ProductsController(IProductServices productServices, IOrderServices orderServices, ICartServices cartServices, IHttpContextAccessor httpContextAccessor)
 {
     this.productServices     = productServices;
     this.orderServices       = orderServices;
     this.cartServices        = cartServices;
     this.httpContextAccessor = httpContextAccessor;
 }
Ejemplo n.º 18
0
        public void Initialize()
        {
            _Cart = new Cart
            {
                Items = new List <CartItem>
                {
                    new() { ProductId = 1, Quantity = 1 },
                    new() { ProductId = 2, Quantity = 3 },
                }
            };

            _ProductDataMock = new Mock <IProductData>();
            _ProductDataMock
            .Setup(c => c.GetProducts(It.IsAny <ProductFilter>()))
            .Returns(new PageProductsDTO(new[]
            {
                new ProductDTO
                {
                    Id       = 1,
                    Name     = "Product 1",
                    Price    = 1.1m,
                    Order    = 1,
                    ImageUrl = "Img_1.png",
                    Brand    = new BrandDTO {
                        Id = 1, Name = "Brand 1", Order = 1
                    },
                    Section = new SectionDTO {
                        Id = 1, Name = "Section 1", Order = 1
                    }
                },
                new ProductDTO
                {
                    Id       = 2,
                    Name     = "Product 2",
                    Price    = 2.2m,
                    Order    = 2,
                    ImageUrl = "Img_2.png",
                    Brand    = new BrandDTO {
                        Id = 2, Name = "Brand 2", Order = 2
                    },
                    Section = new SectionDTO {
                        Id = 2, Name = "Section 2", Order = 2
                    }
                },
                new ProductDTO
                {
                    Id       = 3,
                    Name     = "Product 3",
                    Price    = 3.3m,
                    Order    = 3,
                    ImageUrl = "Img_3.png",
                    Brand    = new BrandDTO {
                        Id = 3, Name = "Brand 3", Order = 3
                    },
                    Section = new SectionDTO {
                        Id = 3, Name = "Section 3", Order = 3
                    }
                },
            }, 3));

            _CartStoreMock = new Mock <ICartStore>();
            _CartStoreMock.Setup(c => c.Cart).Returns(_Cart);

            _CartService = new CartService(_CartStoreMock.Object, _ProductDataMock.Object);
        }
Ejemplo n.º 19
0
 public CartsController(ICartServices cartServices, ICartItemServices cartItemServices)
 {
     _cartServices     = cartServices;
     _cartItemServices = cartItemServices;
 }