Example #1
0
 public SearchService(IOrderService orderService, IProductsService productsService, ICheckoutService checkoutService, ICustomerService customerService)
 {
     this.orderService    = orderService;
     this.productsService = productsService;
     this.checkoutService = checkoutService;
     this.customerService = customerService;
 }
        public void Setup()
        {
            var pricingRules = new List <PricingRule>()
            {
                new PricingRule()
                {
                    SKU = "A", UnitPrice = 50, MultiBuyPrice = 130, MultiBuyQuantity = 3
                },
                new PricingRule()
                {
                    SKU = "B", UnitPrice = 30, MultiBuyPrice = 45, MultiBuyQuantity = 2
                },
                new PricingRule()
                {
                    SKU = "C", UnitPrice = 20
                },
                new PricingRule()
                {
                    SKU = "D", UnitPrice = 15
                }
            };

            _checkoutService    = new CheckoutService(pricingRules);
            _shoppingBagService = new ShoppingBagService();
        }
Example #3
0
 public BooksController(IBookService bookService, ICheckoutService checkoutService, ICheckoutHistoryService checkoutHistoryService, IMapper mapper)
 {
     _bookService            = bookService;
     _checkoutService        = checkoutService;
     _checkoutHistoryService = checkoutHistoryService;
     _mapper = mapper;
 }
Example #4
0
 public CheckOutController()
 {
     _checkoutService = new CheckoutService(new CheckoutRepository(new oecsEntities()));
     _cartService     = new CartService(new CartRepository(new oecsEntities()), new ProductDetailRepository(new oecsEntities()));
     _customerService = new CustomerService(new CustomerRepository(new oecsEntities()));
     _orderService    = new OrderService(new OrderRepository(new oecsEntities()));
 }
 public CheckoutServiceTest()
 {
     //
     // TODO: Add constructor logic here
     //
     _checkoutService = new CheckoutService();
 }
Example #6
0
 public CheckoutApiController(ICheckoutService service
                              , ILogger <CheckoutApiController> logger
                              , IAuthenticationService <int> authService) : base(logger)
 {
     _service     = service;
     _authService = authService;
 }
Example #7
0
 public CheckoutController(
     ICartService cartService,
     IContentRepository contentRepository,
     UrlResolver urlResolver,
     IMailService mailService,
     ICheckoutService checkoutService,
     IContentLoader contentLoader,
     IPaymentService paymentService,
     LocalizationService localizationService,
     Func <string, CartHelper> cartHelper,
     CurrencyService currencyService,
     IAddressBookService addressBookService,
     ControllerExceptionHandler controllerExceptionHandler,
     CustomerContextFacade customerContextFacade)
 {
     _cartService                = cartService;
     _contentRepository          = contentRepository;
     _urlResolver                = urlResolver;
     _mailService                = mailService;
     _checkoutService            = checkoutService;
     _paymentService             = paymentService;
     _contentLoader              = contentLoader;
     _localizationService        = localizationService;
     _cartHelper                 = cartHelper;
     _currencyService            = currencyService;
     _addressBookService         = addressBookService;
     _controllerExceptionHandler = controllerExceptionHandler;
     _customerContext            = customerContextFacade;
 }
Example #8
0
 // create a constructor
 public CatalogController(ILibraryAssetService assetsService, ICheckoutService checkoutsService)
 {
     // save assetsService param off into a private field
     // to have access in the rest of the controller
     _assetsService    = assetsService;
     _checkoutsService = checkoutsService;
 }
Example #9
0
 public CheckoutController(IShoppingService shoppingService, IContactRepository contactRepository, IProductRepository productRepository, ICheckoutService checkoutService)
 {
     mShoppingService   = shoppingService;
     mContactRepository = contactRepository;
     mCheckoutService   = checkoutService;
     mProductRepository = productRepository;
 }
Example #10
0
 public CheckoutControllerForTest(
     ICartService cartService,
     IContentRepository contentRepository,
     UrlResolver urlResolver,
     IMailService mailService,
     ICheckoutService checkoutService,
     IContentLoader contentLoader,
     IPaymentService paymentService,
     LocalizationService localizationService,
     Func <string, CartHelper> cartHelper,
     CurrencyService currencyService,
     AddressBookService addressBookService,
     ControllerExceptionHandler controllerExceptionHandler,
     CustomerContextFacade customerContextFacade,
     CookieService cookieService)
     : base(cartService,
            contentRepository,
            urlResolver,
            mailService,
            checkoutService,
            contentLoader,
            paymentService,
            localizationService,
            cartHelper,
            currencyService,
            addressBookService,
            controllerExceptionHandler,
            customerContextFacade,
            cookieService)
 {
 }
Example #11
0
 public RefundCreditsWhenAppointmentCanceledEventHandler(
     ICheckoutService checkoutService,
     IRepository <Appointment> appointmentRepository)
 {
     _checkoutService       = checkoutService;
     _appointmentRepository = appointmentRepository;
 }
 public ShoppingCartHub(
     ICheckoutService checkoutService,
     IMemoryCache cache)
 {
     this.checkoutService = checkoutService ?? throw new ArgumentNullException(nameof(checkoutService));
     this.cache           = cache ?? throw new ArgumentNullException(nameof(cache));
 }
Example #13
0
 public OrderHistoryViewService(
     IOrderHistoryViewModelFactory orderHistoryViewModelFactory,
     IOrderRepository orderRepository,
     IOrderUrlProvider orderUrlProvider,
     ILookupService lookupService,
     IOrderDetailsViewModelFactory orderDetailsViewModelFactory,
     IImageService imageService,
     IShippingTrackingProviderFactory shippingTrackingProviderFactory,
     ICustomerRepository customerRepository,
     IComposerJsonSerializer composerJsonSerializer,
     ILineItemViewModelFactory lineItemViewModelFactory,
     ICartRepository cartRepository,
     IComposerContext composerContext,
     ICartUrlProvider cartUrlProvider,
     IEditingOrderProvider editingOrderProvider,
     ICheckoutService checkoutService)
 {
     OrderHistoryViewModelFactory = orderHistoryViewModelFactory ?? throw new ArgumentNullException(nameof(orderHistoryViewModelFactory));
     OrderUrlProvider             = orderUrlProvider ?? throw new ArgumentNullException(nameof(orderUrlProvider));
     LookupService   = lookupService ?? throw new ArgumentNullException(nameof(lookupService));
     OrderRepository = orderRepository ?? throw new ArgumentNullException(nameof(orderRepository));
     OrderDetailsViewModelFactory = orderDetailsViewModelFactory ?? throw new ArgumentNullException(nameof(orderDetailsViewModelFactory));
     ImageService = imageService ?? throw new ArgumentNullException(nameof(imageService));
     ShippingTrackingProviderFactory = shippingTrackingProviderFactory ?? throw new ArgumentNullException(nameof(shippingTrackingProviderFactory));
     CustomerRepository       = customerRepository ?? throw new ArgumentNullException(nameof(customerRepository));
     ComposerJsonSerializer   = composerJsonSerializer ?? throw new ArgumentNullException(nameof(composerJsonSerializer));
     LineItemViewModelFactory = lineItemViewModelFactory ?? throw new ArgumentNullException(nameof(lineItemViewModelFactory));
     CartRepository           = cartRepository ?? throw new ArgumentNullException(nameof(cartRepository));
     ComposerContext          = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     CartUrlProvider          = cartUrlProvider ?? throw new ArgumentNullException(nameof(cartUrlProvider));
     EditingOrderProvider     = editingOrderProvider ?? throw new ArgumentNullException(nameof(editingOrderProvider));
     CheckoutService          = checkoutService ?? throw new ArgumentNullException(nameof(checkoutService));
 }
Example #14
0
 public EmployeeService(AppDbContext context,
                        ICheckoutService checkoutService,
                        IDepartmentService departmentService)
 {
     _context           = context;
     _checkoutService   = checkoutService;
     _departmentService = departmentService;
 }
 public CheckoutController(UserManager <User> userManager, SignInManager <User> signInManager, IMapper mapper,
                           ICheckoutService checkoutService, FurryPalDbContext dbContext, ShoppingCart shoppingCart) :
     base(userManager, signInManager, mapper)
 {
     this.dbContext       = dbContext;
     this.checkoutService = checkoutService;
     this.shoppingCart    = shoppingCart;
 }
Example #16
0
        public SquareService(ICheckoutService checkoutService, IOptions <SquareSecretKey> squareSecretKey, IHostingEnvironment env)
        {
            _checkoutService = checkoutService;
            _env             = env;
            _checkout        = new CheckoutApi();

            Configuration.Default.AccessToken = env.IsProduction() ? squareSecretKey?.Value?.Secret : "sandbox-sq0atb-CiMknPZajSaOmSBVRx6ifQ";
        }
Example #17
0
 public GatewayController(IDataService <CategoryTransferObject> categoriesService, IProductService productsService, ICartService cartService,
                          ICheckoutService checkoutService)
 {
     _categoriesService = categoriesService;
     _productsService   = productsService;
     _cartService       = cartService;
     _checkoutService   = checkoutService;
 }
Example #18
0
 /// <summary>
 ///
 /// </summary>
 static void Initalize()
 {
     _checkoutService   = new CheckoutService();
     _productService    = new ProductService();
     AvailiableProducts = _productService.Get();
     DisplayCurrentOffers();
     DisplayProducts();
 }
Example #19
0
 public PromotionRuleEngineeController(IProductService productService,
                                       IPromoRuleService promoRuleService, ICartService cartService, ICheckoutService checkoutService)
 {
     _productService   = productService;
     _promoRuleService = promoRuleService;
     _cartService      = cartService;
     _checkoutService  = checkoutService;
 }
Example #20
0
 public CheckoutController(Cart cart, IBannerService bannerService, ICommonService commonService, ICheckoutService checkoutService)
 {
     _cart            = cart;
     _bannerService   = bannerService;
     _commonService   = commonService;
     _checkoutService = checkoutService;
     _siteSettings    = _commonService.GetSiteSettings();
 }
Example #21
0
 public CheckoutController(IBaseServise baseServise,
                           IProductPiecesAvailableService productPiecesAvailableService,
                           ICheckoutService checkoutService)
 {
     _baseServise = baseServise;
     _productPiecesAvailableService = productPiecesAvailableService;
     _checkoutService = checkoutService;
 }
 public CheckoutHandler(IReservationRepository reservation, ICurrentUserService currentUser, IConfiguration configuration, IDateTime date, ICheckoutService checkout)
 {
     _reservation   = reservation ?? throw new ArgumentNullException(nameof(reservation));
     _currentUser   = currentUser ?? throw new ArgumentNullException(nameof(currentUser));
     _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     _date          = date ?? throw new ArgumentNullException(nameof(date));
     _checkout      = checkout ?? throw new ArgumentNullException(nameof(checkout));
 }
 public CatalogController(
     ILibraryAssetService assetsService,
     IHoldService holdService,
     ICheckoutService checkoutsService)
 {
     _assetsService    = assetsService;
     _checkoutsService = checkoutsService;
     _holdService      = holdService;
 }
        internal static ICheckoutService GetCheckoutService()
        {
            if (_checkoutService == null)
            {
                _checkoutService = new StubCheckoutService();
            }

            return _checkoutService;
        }
Example #25
0
 public EmployeeController(
     IEmployeeService employees,
     ICheckoutService checkouts,
     IDepartmentService departments)
 {
     _employees   = employees;
     _checkouts   = checkouts;
     _departments = departments;
 }
Example #26
0
        internal static ICheckoutService GetCheckoutService()
        {
            if (_checkoutService == null)
            {
                _checkoutService = new StubCheckoutService();
            }

            return(_checkoutService);
        }
Example #27
0
 public CheckoutController(IOptions <ApplicationSettings> appSettings, AChomeContext context, IMapper mapper,
                           ICheckoutService checkoutService, ILogger <CheckoutService> logger)
 {
     logger.LogInformation("CheckoutServiceController");
     this.appSettings     = appSettings?.Value;
     this.context         = context;
     this.checkoutService = checkoutService;
     this.mapper          = mapper;
 }
Example #28
0
 public ReferenceMover(
     ICheckoutService checkOutService,
     IFileCopyService fileCopyService,
     IReferenceHintPathService referenceHintPathService )
 {
     _checkOutService = checkOutService;
     _fileCopyService = fileCopyService;
     _referenceHintPathService = referenceHintPathService;
 }
 public CatalogController(
     ILibraryAssetService libraryAssetService,
     ICheckoutService checkoutService,
     IBranchService branchService)
 {
     _libraryAssetService = libraryAssetService;
     _checkoutService     = checkoutService;
     _branchService       = branchService;
 }
Example #30
0
 public DeleteHotelRoomHandler(IHotelRoomRepository hotelRoom, IReservationRepository reservation, IDateTime date, ICheckoutService checkout, IConfiguration configuration, ICurrentUserService currentUser)
 {
     _hotelRoom     = hotelRoom ?? throw new ArgumentNullException(nameof(hotelRoom));
     _reservation   = reservation ?? throw new ArgumentNullException(nameof(reservation));
     _date          = date ?? throw new ArgumentNullException(nameof(date));
     _checkout      = checkout ?? throw new ArgumentNullException(nameof(checkout));
     _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     _currentUser   = currentUser ?? throw new ArgumentNullException(nameof(currentUser));
 }
        public CheckoutController()
        {
            byte[] buf = new byte[8];
            rnd.NextBytes(buf);
            var longRand = BitConverter.ToInt64(buf, 0);

            _checkoutService = ServiceProxy.Create <ICheckoutService>(
                serviceUri: new Uri("fabric:/ECommerce.Sf/ECommerce.CheckoutService"),
                partitionKey: new ServicePartitionKey(longRand));
        }
Example #32
0
 public EmailController(ITransactionService transactionService, ICheckoutService checkoutService, IPersonService personService,
                        IMappingEngine mappingEngine, IMailerService mailerService, IBasketViewModelBuilder basketViewModelBuilder)
 {
     _transactionService     = transactionService;
     _checkoutService        = checkoutService;
     _mappingEngine          = mappingEngine;
     _mailer                 = mailerService;
     _basketViewModelBuilder = basketViewModelBuilder;
     _personService          = personService;
 }
		public CheckoutController(
            IRepository<Basket> basketRepository, 
            IUserService userService, 
            IRepository<Order> orderRepository, 
            IUnitOfWorkManager unitOfWork, 
            ICheckoutService checkoutService)
		{
			this.basketRepository = basketRepository;
		    this.checkoutService = checkoutService;
			this.unitOfWork = unitOfWork;
			this.orderRepository = orderRepository;
			this.userService = userService;
		}
	    public void SetUp()
	    {
            basketRepository = MockRepository.GenerateStub<IRepository<Basket>>();
            encryptionService = MockRepository.GenerateStub<IEncryptionService>();
	        postageService = MockRepository.GenerateStub<IPostageService>();
	        userService = MockRepository.GenerateStub<IUserService>();

            checkoutService = new CheckoutService(basketRepository, encryptionService, postageService, userService);

            checkoutViewData = GetCheckoutViewData();
            basket = CreateBasketWithId(7);
            basketRepository.Stub(r => r.GetById(7)).Return(basket);

            user = new User { Role = Role.Administrator };
	        userService.Stub(u => u.CurrentUser).Return(user);
	    }
		public void Setup()
		{
			basketRepository = MockRepository.GenerateStub<IRepository<Basket>>();
			unitOfWorkManager = MockRepository.GenerateStub<IUnitOfWorkManager>();

			userService = MockRepository.GenerateStub<IUserService>();
			orderRepository = new FakeRepository<Order>();
		    MockRepository.GenerateStub<IEncryptionService>();
		    checkoutService = MockRepository.GenerateStub<ICheckoutService>();

			controller = new CheckoutController(
				basketRepository,
				userService,
				orderRepository,
				unitOfWorkManager,
                checkoutService
			);

			userService.Stub(us => us.CurrentUser).Return(new User { Id = 4, Role = Role.Administrator });
		}
 /// <summary>
 /// Initializes a new instance of the CheckoutViewModel class.
 /// </summary>
 public CheckoutContainerViewModel(ICheckoutService checkoutService)
 {
     _checkoutService = checkoutService;
 }
 public CheckoutControllerForTest(ICartService cartService, IContentRepository contentRepository, UrlResolver urlResolver, IMailService mailService, ICheckoutService checkoutService, IContentLoader contentLoader, IPaymentService paymentService, LocalizationService localizationService, Func<string,CartHelper> cartHelper, CurrencyService currencyService, AddressBookService addressBookService, ControllerExceptionHandler controllerExceptionHandler, CustomerContextFacade customerContextFacade)
     : base(cartService, contentRepository, urlResolver, mailService, checkoutService, contentLoader, paymentService, localizationService, cartHelper, currencyService, addressBookService, controllerExceptionHandler,customerContextFacade)
 {
 }
Example #38
0
 public Garage(ICheckoutService checkoutService)
 {
     _checkoutService = checkoutService;
     _parkedCars = new List<Car>();
 }
 /// <summary>
 /// Initializes a new instance of the CheckoutManageViewModel class.
 /// </summary>
 public CheckoutManageViewModel(ICheckoutService checkoutService)
 {
     _checkoutService = checkoutService;
 }