public CartService( IProductService productService, IPricingService pricingService, IOrderFactory orderFactory, CustomerContextFacade customerContext, IPlacedPriceProcessor placedPriceProcessor, IInventoryProcessor inventoryProcessor, ILineItemValidator lineItemValidator, IOrderRepository orderRepository, IPromotionEngine promotionEngine, IAddressBookService addressBookService, ICurrentMarket currentMarket, ICurrencyService currencyService) { _productService = productService; _pricingService = pricingService; _orderFactory = orderFactory; _customerContext = customerContext; _placedPriceProcessor = placedPriceProcessor; _inventoryProcessor = inventoryProcessor; _lineItemValidator = lineItemValidator; _promotionEngine = promotionEngine; _orderRepository = orderRepository; _addressBookService = addressBookService; _currentMarket = currentMarket; _currencyService = currencyService; }
/// <summary> /// /// </summary> public ManualSim() { this.orderFac = new DefaultOrderFactory(); this.pfFac = new PipeFilterFactory(); this.filters = new Dictionary<string, IFilter>(); this.pipes = new Dictionary<string, IPipe>(); }
public MigrationAssistant(bool testOnly) { _testOnly = testOnly; _orderFactory = Sitecore.Ecommerce.Context.Entity.Resolve <IOrderFactory>(); _orderStatesRepository = Sitecore.Ecommerce.Context.Entity.Resolve <IOrderStatesRepository>(); _orderRepository = Sitecore.Ecommerce.Context.Entity.Resolve <IOrderRepository <ActiveCommerce.Orders.Order> >(); }
public CheckoutControllerForTest( IContentRepository contentRepository, IMailService mailService, LocalizationService localizationService, ICurrencyService currencyService, ControllerExceptionHandler controllerExceptionHandler, CustomerContextFacade customerContextFacade, IOrderRepository orderRepository, CheckoutViewModelFactory checkoutViewModelFactory, IOrderGroupCalculator orderGroupCalculator, IPaymentProcessor paymentProcessor, IPromotionEngine promotionEngine, ICartService cartService, IAddressBookService addressBookService, OrderSummaryViewModelFactory orderSummaryViewModelFactory, IOrderFactory orderFactory ) : base(contentRepository, mailService, localizationService, currencyService, controllerExceptionHandler, customerContextFacade, orderRepository, checkoutViewModelFactory, orderGroupCalculator, paymentProcessor, promotionEngine, cartService, addressBookService, orderSummaryViewModelFactory, orderFactory) { }
public ShoppingCart(ICartLineFactory factory, IProductService service, IOrderService orderService, IOrderFactory orderFactory) { if (factory == null) { throw new ArgumentNullException("factory cannot be null"); } if (service == null) { throw new ArgumentNullException("service cannot be null"); } if (orderService == null) { throw new ArgumentNullException("orderService cannot be null"); } if (orderFactory == null) { throw new ArgumentNullException("orderFactory cannot be null"); } this.factory = factory; this.service = service; this.orderService = orderService; this.orderFactory = orderFactory; this.CartLines = new Collection <ICartLine>(); }
public CheckoutController(IContentRepository contentRepository, IMailService mailService, LocalizationService localizationService, ICurrencyService currencyService, ControllerExceptionHandler controllerExceptionHandler, CustomerContextFacade customerContextFacade, IOrderRepository orderRepository, CheckoutViewModelFactory checkoutViewModelFactory, IOrderGroupCalculator orderGroupCalculator, IPaymentProcessor paymentProcessor, IPromotionEngine promotionEngine, ICartService cartService, IAddressBookService addressBookService, OrderSummaryViewModelFactory orderSummaryViewModelFactory, IOrderFactory orderFactory) { _contentRepository = contentRepository; _mailService = mailService; _localizationService = localizationService; _currencyService = currencyService; _controllerExceptionHandler = controllerExceptionHandler; _customerContext = customerContextFacade; _orderRepository = orderRepository; _checkoutViewModelFactory = checkoutViewModelFactory; _orderGroupCalculator = orderGroupCalculator; _paymentProcessor = paymentProcessor; _promotionEngine = promotionEngine; _cartService = cartService; _addressBookService = addressBookService; _orderSummaryViewModelFactory = orderSummaryViewModelFactory; _orderFactory = orderFactory; }
// private readonly IApprovableDomainService _approvableDomainService; // private readonly IGoodPartyAssignmentDomainService _goodPartyAssignmentDomainService; public OrderApplicationService(IOrderRepository orderRepository, IUnitOfWorkScope unitOfWorkScope, // IGoodPartyAssignmentDomainService goodPartyAssignmentDomainService, //IFuelUserRepository userRepository, IVesselInCompanyDomainService vesselDomainService, IGoodDomainService goodDomainService, IOrderFactory iOrderFactory, ICompanyDomainService companyDomainService, IOrderItemDomainService orderItemDomainService, IEntityConfigurator<Order> orderConfigurator //,IApprovableDomainService approvableDomainService ) { this.orderRepository = orderRepository; this.vesselDomainService = vesselDomainService; this.goodDomainService = goodDomainService; this.iOrderFactory = iOrderFactory; this.unitOfWorkScope = unitOfWorkScope; this.companyDomainService = companyDomainService; this.orderItemDomainService = orderItemDomainService; this.orderConfigurator = orderConfigurator; // _approvableDomainService = approvableDomainService; // _goodPartyAssignmentDomainService = goodPartyAssignmentDomainService; }
/// <summary> /// /// </summary> public ManualSim(IPipeFilterFactory pf, IOrderFactory of) { this.orderFac = of; this.pfFac = pf; this.filters = new Dictionary<string, IFilter>(); this.pipes = new Dictionary<string, IPipe>(); }
public void SetUp() { _mocks = new MockRepository(); _dataRecorderMetaDataFactory = _mocks.StrictMock <IDataRecorderMetaDataFactory>(); _mocks.StrictMock <IMapper <Falcon.App.Core.Finance.Domain.Order, OrderEntity> >(); _orderFactory = new OrderFactory(_dataRecorderMetaDataFactory); }
/// <summary> /// /// </summary> public AutoSim() { this.orderFac = new DefaultOrderFactory(); this.pfFac = new PipeFilterFactory(); this.filters = new Dictionary<string, IFilter>(); this.pipes = new List<IPipe>(); this.rnd = new Random(); }
/// <summary> /// /// </summary> public AutoSim(IPipeFilterFactory pf, IOrderFactory of) { this.orderFac = of; this.pfFac = pf; this.filters = new Dictionary<string, IFilter>(); this.pipes = new List<IPipe>(); this.rnd = new Random(); }
public OrderListDataBinder(IOrderFactory orderFactory) { if (orderFactory == null) { throw new ArgumentNullException("orderFactory"); } _orderFactory = orderFactory; }
public NewOrderItemCommand(ICommandEventsManager commandEventsManager, IOrderRepository orderRepository, IUserRepository userRepository, ISupplierRepository suppliersRepository, IOrderFactory orderFactory, IOrderItemFactory orderItemFactory, IUserFactory userFactory) : base(commandEventsManager) { this.orderRepository = orderRepository; this.userRepository = userRepository; this.suppliersRepository = suppliersRepository; this.orderFactory = orderFactory; this.orderItemFactory = orderItemFactory; this.userFactory = userFactory; }
public AddressBookService( CustomerContextFacade customerContext, CountryManagerFacade countryManager, IOrderFactory orderFactory) { _customerContext = customerContext; _countryManager = countryManager; _orderFactory = orderFactory; }
public GenericCreditCardPaymentMethod(LocalizationService localizationService, IOrderFactory orderFactory) : base(localizationService) { _orderFactory = orderFactory; ExpirationMonth = DateTime.Now.Month; CreditCardSecurityCode = "212"; CardType = "Generic"; CreditCardNumber = "4662519843660534"; }
public OrderServiceTests() { orderRepository = Substitute.For<IOrderRepository>(); userRepository = Substitute.For<IUserRepository>(); cartRepository = Substitute.For<ICartRepository>(); factory = Substitute.For<IOrderFactory>(); sut = new OrderService(orderRepository, userRepository, cartRepository, factory); }
public OrderService(IOrderFactory orderFactory, ICustomerOrdersRepository customerOrdersRepository, IUnitOfWork unitOfWork, IPointsCalculator pointsCalculator, IDiscountCalculator discountCalculator) { this.orderFactory = orderFactory; this.customerOrdersRepository = customerOrdersRepository; this.unitOfWork = unitOfWork; this.pointsCalculator = pointsCalculator; this.discountCalculator = discountCalculator; }
public OrderService(IOrderRepository orderRepository, IUserRepository userRepository, ICartRepository cartRepository, IOrderFactory factory) { this.orderRepository = orderRepository; this.userRepository = userRepository; this.cartRepository = cartRepository; this.factory = factory; }
public OrderService(IOrderFactory orderFactory, IUnitOfWork unitOfWork, ICenterProductService centerProductService, IUserService userService) { this.userService = userService; this.centerProductService = centerProductService; this.unitOfWork = unitOfWork; this.orderFactory = orderFactory; }
public CreateOrderCommandHandler( IOrderFactory orderFactory, IOrderRepository orderRepository, IDishRepository dishRepository, ICurrentUser currentUser) { OrderFactory = orderFactory; OrderRepository = orderRepository; DishRepository = dishRepository; CurrentUser = currentUser; }
public OrderService( IOrderRepository orderRepository, IProductRepository productRepository, IOrderFactory orderFactory, ICustomMapper customMapper) { this.orderRepository = orderRepository; this.productRepository = productRepository; this.orderFactory = orderFactory; this.customMapper = customMapper; }
public OrderDomainService( DomainServiceParameters domainServiceParameters, ISystemUserFactory systemUserFactory, IOrderFactory orderFactory, IOrderIsValidToImportValidator orderIsValidToImportValidator ) : base(domainServiceParameters) { _systemUserFactory = systemUserFactory; _orderFactory = orderFactory; _orderIsValidToImportValidator = orderIsValidToImportValidator; }
public EditOrderCommandHandler( IOrderRepository orderRepository, IProductReadonlyRepository productReadonlyRepository, IOrderFactory orderFactory, IMapper mapper) { _orderRepository = orderRepository; _productReadonlyRepository = productReadonlyRepository; _orderFactory = orderFactory; _mapper = mapper; }
/// <summary> /// Initializes a new instance of the <see cref = "MainWindow"/> class. /// </summary> public MainWindow() { InitializeComponent(); this.configuration = new OrderConfiguration(); this.factory = configuration.GetFactory(); this.builder = configuration.GetBuilder(); this.validator = configuration.GetValidator(); this.database = configuration.GetDatabase(); this.builder.Factory = factory; this.textBoxClassOfTheTaxi.ItemsSource = Enum.GetNames(typeof(CarClass)); this.textBoxClassOfTheTaxi.SelectedIndex = 0; }
public UpdateOrderUseCase(IMapper mapper, IUnitOfWork unitOfWork, IOrderRepository orderRepository, IProductReadRepository productReadRepository, IOrderFactory orderFactory) { _mapper = mapper; _unitOfWork = unitOfWork; _orderRepository = orderRepository; _productReadRepository = productReadRepository; _orderFactory = orderFactory; }
public static IPaymentMethodViewModel<PaymentMethodBase> Resolve(string paymentMethodName, IOrderFactory orderFactory) { switch (paymentMethodName) { case "CashOnDelivery": return new CashOnDeliveryViewModel { PaymentMethod = new CashOnDeliveryPaymentMethod(orderFactory)}; case "GenericCreditCard": return new GenericCreditCardViewModel { PaymentMethod = new GenericCreditCardPaymentMethod(orderFactory) }; } throw new ArgumentException("No view model has been implemented for the method " + paymentMethodName, "paymentMethodName"); }
public ViewFactory(IOrderFactory orderFactory, IOrderListDataBinder orderListDataBinder, IOrderEditDataBinder orderEditDataBinder) { if (orderFactory == null) throw new ArgumentNullException("orderFactory"); if (orderListDataBinder == null) throw new ArgumentNullException("orderListDataBinder"); if (orderEditDataBinder == null) throw new ArgumentNullException("orderEditDataBinder"); _orderFactory = orderFactory; _orderListDataBinder = orderListDataBinder; _orderEditDataBinder = orderEditDataBinder; }
public BaseTest(Fixture fixture) { Fixture = fixture; _customerFactory = Fixture.GetService <ICustomerFactory>(); _orderFactory = Fixture.GetService <IOrderFactory>(); _productFactory = Fixture.GetService <IProductFactory>(); _customerRepository = Fixture.GetService <ICustomerRepository>(); _orderRepository = Fixture.GetService <IOrderRepository>(); _productRepository = Fixture.GetService <IProductRepository>(); }
public OrderListPresenter(IOrderFactory orderFactory, IOrderListDataBinder dataBinder, IViewFactory viewFactory) { if (orderFactory == null) throw new ArgumentNullException("orderFactory"); if (dataBinder == null) throw new ArgumentNullException("dataBinder"); if (viewFactory == null) throw new ArgumentNullException("viewFactory"); _orderFactory = orderFactory; _dataBinder = dataBinder; _viewFactory = viewFactory; }
public void ProcessTest() { IFilter target = pffactory.CreateFilter("HWTEST"); // TODO: Initialize to an appropriate value this.orderFac = new DefaultOrderFactory(); int rand = 0; AbstractOrder order = (rand == 0) ? this.orderFac.CreateOrder("desktop") : this.orderFac.CreateOrder("laptop"); int expected = target.InputBufferToString().Count + 1; target.Push(order); int actual = target.InputBufferToString().Count; Assert.AreEqual(expected, actual); }
public EditorViewModel(IEventAggregator eventAggregator, IDirectoryManager directoryManager, IOrderRepository orderRepository, IOrderFactory orderFactory) { _eventAggregator = eventAggregator; _orderRepository = orderRepository; _orderFactory = orderFactory; DirectoryManager = directoryManager; InitializeEvents(_eventAggregator); }
/// <summary> /// Initializes a new instance of the <see cref="CreateOrderActionPresenter" /> class. /// </summary> /// <param name="view">The view.</param> /// <param name="orderSecurity">The merchant order security.</param> /// <param name="orderFactory">The order factory.</param> /// <param name="orderManager">The order manager.</param> /// <param name="stateConfiguration">The state configuration.</param> public CreateOrderActionPresenter([NotNull] ICreateOrderActionView view, [NotNull] MerchantOrderSecurity orderSecurity, [NotNull] IOrderFactory orderFactory, [NotNull] MerchantOrderManager orderManager, [NotNull] MerchantOrderStateConfiguration stateConfiguration) { Assert.ArgumentNotNull(view, "view"); Assert.ArgumentNotNull(orderSecurity, "orderSecurity"); Assert.ArgumentNotNull(orderFactory, "orderFactory"); Assert.ArgumentNotNull(orderManager, "orderManager"); Assert.ArgumentNotNull(stateConfiguration, "stateConfiguration"); this.view = view; this.orderSecurity = orderSecurity; this.orderFactory = orderFactory; this.orderManager = orderManager; this.stateConfiguration = stateConfiguration; }
public CreateOrderCommandHandler(IUserQueryService userQueryService, IShipmentQueryService shipmentQueryService, IOrderDiscountQueryService orderDiscountQueryService, IProductOrderQueryService productOrderQueryService, IAddressQueryService addressQueryService, IOrderFactory orderFactory, IEmailService emailService, IPaymentsRepository paymentsRepository) { this.userQueryService = userQueryService; this.shipmentQueryService = shipmentQueryService; this.orderDiscountQueryService = orderDiscountQueryService; this.productOrderQueryService = productOrderQueryService; this.orderFactory = orderFactory; this.addressQueryService = addressQueryService; this.emailService = emailService; this.paymentsRepository = paymentsRepository; }
public CreateOrderCommandHandler(IApplicationContext applicationContext, IMapper mapper, IOrderRepository orderRepository, ICustomerReadonlyRepository customerReadonlyRepository, IProductReadonlyRepository productReadonlyRepository, IOrderFactory orderFactory) { _applicationContext = applicationContext; _mapper = mapper; _orderRepository = orderRepository; _customerReadonlyRepository = customerReadonlyRepository; _productReadonlyRepository = productReadonlyRepository; _orderFactory = orderFactory; }
public CreateOrderCommand(IDateTimeService dateTimeService, IOrderRepositoryFacade orderRepositoryFacade, IOrderFactory orderFactory, IClearShoppingCartCommand clearShoppingCartCommand, IUnitOfWork unitOfWork, IInventoryService inventoryService) { _dateTimeService = dateTimeService; _orderRepositoryFacade = orderRepositoryFacade; _orderFactory = orderFactory; _clearShoppingCartCommand = clearShoppingCartCommand; _unitOfWork = unitOfWork; _inventoryService = inventoryService; }
public static void MyClassInitialize(TestContext testContext) { _container = new UnityContainer(); _container.RegisterInstance <IUnityContainer>(_container); _container.RegisterType <IOrderFactory, OrderFactory>(); _container.RegisterInstance(typeof(Cadastro), "Cliente", new Cadastro()); _container.RegisterInstance(typeof(Cadastro), "Fornecedor", new Cadastro()); _container.RegisterInstance(typeof(Vendedor), "Vendedor", new Vendedor()); IOrderFactory orderFactory = _container.Resolve <IOrderFactory>(); _container.RegisterInstance(typeof(Pedido), "PedidoVenda", orderFactory.CreateOrder(OrderType.SalesOrder)); _container.RegisterInstance(typeof(Pedido), "PedidoCompra", orderFactory.CreateOrder(OrderType.PurchaseOrder)); _container.RegisterInstance <IOrderViewModel>("VM_PedidoVenda", new OrderViewModel(_container, (Pedido)_container.Resolve(typeof(Pedido), "PedidoVenda"))); _container.RegisterInstance <IOrderViewModel>("VM_PedidoCompra", new OrderViewModel(_container, (Pedido)_container.Resolve(typeof(Pedido), "PedidoCompra"))); }
public ViewFactory(IOrderFactory orderFactory, IOrderListDataBinder orderListDataBinder, IOrderEditDataBinder orderEditDataBinder) { if (orderFactory == null) { throw new ArgumentNullException("orderFactory"); } if (orderListDataBinder == null) { throw new ArgumentNullException("orderListDataBinder"); } if (orderEditDataBinder == null) { throw new ArgumentNullException("orderEditDataBinder"); } _orderFactory = orderFactory; _orderListDataBinder = orderListDataBinder; _orderEditDataBinder = orderEditDataBinder; }
public void CreateOrderTest() { IOrderFactory target = _container.Resolve <IOrderFactory>(); Pedido actual = target.CreateOrder(OrderType.SalesOrder); AssertOrder(target.CreateOrder(OrderType.PurchaseOrder), OrderType.PurchaseOrder); AssertOrder(target.CreateOrder(OrderType.SalesOrder), OrderType.SalesOrder); _container.RegisterInstance(typeof(Cadastro), "Cliente", new Cadastro()); _container.RegisterInstance(typeof(Cadastro), "Fornecedor", new Cadastro()); AssertOrder(target.CreateOrder(OrderType.PurchaseOrder), OrderType.PurchaseOrder); AssertOrder(target.CreateOrder(OrderType.SalesOrder), OrderType.SalesOrder); _container.RegisterInstance(typeof(Vendedor), "Vendedor", new Vendedor()); AssertOrder(target.CreateOrder(OrderType.PurchaseOrder), OrderType.PurchaseOrder); AssertOrder(target.CreateOrder(OrderType.SalesOrder), OrderType.SalesOrder); }
public OrderListPresenter(IOrderFactory orderFactory, IOrderListDataBinder dataBinder, IViewFactory viewFactory) { if (orderFactory == null) { throw new ArgumentNullException("orderFactory"); } if (dataBinder == null) { throw new ArgumentNullException("dataBinder"); } if (viewFactory == null) { throw new ArgumentNullException("viewFactory"); } _orderFactory = orderFactory; _dataBinder = dataBinder; _viewFactory = viewFactory; }
public CheckoutViewModelFactory( LocalizationService localizationService, PaymentMethodViewModelFactory paymentMethodViewModelFactory, IAddressBookService addressBookService, IContentLoader contentLoader, IOrderFactory orderFactory, UrlResolver urlResolver, ServiceAccessor<HttpContextBase> httpContextAccessor, ShipmentViewModelFactory shipmentViewModelFactory) { _localizationService = localizationService; _paymentMethodViewModelFactory = paymentMethodViewModelFactory; _addressBookService = addressBookService; _contentLoader = contentLoader; _orderFactory = orderFactory; _urlResolver = urlResolver; _httpContextAccessor = httpContextAccessor; _shipmentViewModelFactory = shipmentViewModelFactory; }
protected void SetUp() { _orderRepository = _mocks.StrictMock <IOrderRepository>(); _orderItemRepository = _mocks.StrictMock <IOrderItemRepository>(); _orderFactory = _mocks.StrictMock <IOrderFactory>(); _orderDetailFactory = _mocks.StrictMock <IOrderDetailFactory>(); _orderItemStatusFactory = _mocks.StrictMock <IOrderItemStatusFactory>(); _orderSynchronizationService = _mocks.StrictMock <IOrderSynchronizationService>(); _refundRepository = _mocks.StrictMock <IUniqueItemRepository <Refund> >(); _electronicProductRepository = _mocks.StrictMock <IElectronicProductRepository>(); _shippingDetailRepository = _mocks.StrictMock <IShippingDetailRepository>(); _preApprovedTestRepository = _mocks.StrictMock <IPreApprovedTestRepository>(); _preApprovedPackageRepository = _mocks.StrictMock <IPreApprovedPackageRepository>(); _organizationRoleUserRepository = _mocks.StrictMock <IOrganizationRoleUserRepository>(); _orderController = new OrderController(_orderRepository, _orderItemRepository, _orderFactory, _orderDetailFactory, _electronicProductRepository, _orderItemStatusFactory, _orderSynchronizationService, _refundRepository, _shippingDetailRepository, _preApprovedTestRepository, _preApprovedPackageRepository, _organizationRoleUserRepository); }
public void SetUp() { _orderFactory = new OrderFactory(); }
public void PushTest1() { IFilter target = pffactory.CreateFilter("SWINSTALL"); // TODO: Initialize to an appropriate value int expected = target.InputCount + 1; this.orderFac = new DefaultOrderFactory(); int rand = 0; AbstractOrder order = (rand == 0) ? this.orderFac.CreateOrder("desktop") : this.orderFac.CreateOrder("laptop"); target.Push(order); int actual = target.InputCount; Assert.AreEqual(expected, actual); }
public OrderInputWindow(ref IFilter filter) { InitializeComponent(); this.orderFac = new DefaultOrderFactory(); this.filter = filter; }
public GenericCreditCardPaymentMethod(IOrderFactory orderFactory) : this(LocalizationService.Current, orderFactory) { }
public OrderListDataBinder(IOrderFactory orderFactory) { if (orderFactory == null) throw new ArgumentNullException("orderFactory"); _orderFactory = orderFactory; }
public StartOrderCommand(IEventManager eventManager, IOrderFactory orderFactory) { _eventManager = eventManager; _orderFactory = orderFactory; }
public Waiter(IReferenceData referenceData, IOrderFactory orderFactory) { _referenceData = referenceData; _referenceData.Load("ReferenceData.xml"); _orderFactory = orderFactory; }
public void PushTest1() { IFilter target = pffactory.CreateFilter("HWASSEMBLE"); // TODO: Initialize to an appropriate value int expected = 0; foreach (KeyValuePair<int, AbstractOrder> a in target.Input) { expected++; } expected = +1; this.orderFac = new DefaultOrderFactory(); AbstractOrder order = this.orderFac.CreateOrder("desktop"); target.Push(order); int actual = 0; foreach (KeyValuePair<int, AbstractOrder> a in target.Input) { actual++; } Assert.AreEqual(expected, actual); }
public CashOnDeliveryPaymentMethod(LocalizationService localizationService, IOrderFactory orderFactory) : base(localizationService) { _orderFactory = orderFactory; }
public void PullTest() { this.orderFac = new DefaultOrderFactory(); int rand = 0; AbstractOrder expected = null; AbstractOrder order = (rand == 0) ? this.orderFac.CreateOrder("desktop") : this.orderFac.CreateOrder("laptop"); IFilter target = pffactory.CreateFilter("SWTEST"); // TODO: Initialize to an appropriate value AbstractOrder actual; actual = target.Pull(); Assert.AreEqual(expected, actual); }
public CashOnDeliveryPaymentMethod(IOrderFactory orderFactory) : this(LocalizationService.Current, orderFactory) { }