コード例 #1
0
ファイル: CartService.cs プロジェクト: adrian18hd/Quicksilver
 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;
 }
コード例 #2
0
ファイル: ManualSim.cs プロジェクト: kajnelissen/Sedat
 /// <summary>
 /// 
 /// </summary>
 public ManualSim()
 {
     this.orderFac = new DefaultOrderFactory();
     this.pfFac = new PipeFilterFactory();
     this.filters = new Dictionary<string, IFilter>();
     this.pipes = new Dictionary<string, IPipe>();
 }
コード例 #3
0
 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> >();
 }
コード例 #4
0
 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)
 {
 }
コード例 #5
0
        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>();
        }
コード例 #6
0
 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;
 }
コード例 #7
0
 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;
 }
コード例 #8
0
        //    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;
        }
コード例 #9
0
ファイル: ManualSim.cs プロジェクト: kajnelissen/Sedat
 /// <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>();
 }
コード例 #10
0
 public void SetUp()
 {
     _mocks = new MockRepository();
     _dataRecorderMetaDataFactory = _mocks.StrictMock <IDataRecorderMetaDataFactory>();
     _mocks.StrictMock <IMapper <Falcon.App.Core.Finance.Domain.Order, OrderEntity> >();
     _orderFactory = new OrderFactory(_dataRecorderMetaDataFactory);
 }
コード例 #11
0
ファイル: AutoSim.cs プロジェクト: kajnelissen/Sedat
 /// <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();
 }
コード例 #12
0
ファイル: AutoSim.cs プロジェクト: kajnelissen/Sedat
 /// <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();
 }
コード例 #13
0
 public OrderListDataBinder(IOrderFactory orderFactory)
 {
     if (orderFactory == null)
     {
         throw new ArgumentNullException("orderFactory");
     }
     _orderFactory = orderFactory;
 }
コード例 #14
0
 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;
 }
コード例 #15
0
 public AddressBookService(
     CustomerContextFacade customerContext,
     CountryManagerFacade countryManager,
     IOrderFactory orderFactory)
 {
     _customerContext = customerContext;
     _countryManager  = countryManager;
     _orderFactory    = orderFactory;
 }
コード例 #16
0
 public GenericCreditCardPaymentMethod(LocalizationService localizationService, IOrderFactory orderFactory)
     : base(localizationService)
 {
     _orderFactory          = orderFactory;
     ExpirationMonth        = DateTime.Now.Month;
     CreditCardSecurityCode = "212";
     CardType         = "Generic";
     CreditCardNumber = "4662519843660534";
 }
コード例 #17
0
 public AddressBookService(
     CustomerContextFacade customerContext,
     CountryManagerFacade countryManager,
     IOrderFactory orderFactory)
 {
     _customerContext = customerContext;
     _countryManager = countryManager;
     _orderFactory = orderFactory;
 }
コード例 #18
0
        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);
        }
コード例 #19
0
 public GenericCreditCardPaymentMethod(LocalizationService localizationService, IOrderFactory orderFactory)
     : base(localizationService)
 {
     _orderFactory = orderFactory;
     ExpirationMonth = DateTime.Now.Month;
     CreditCardSecurityCode = "212";
     CardType = "Generic";
     CreditCardNumber = "4662519843660534";
 }
コード例 #20
0
 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;
 }
コード例 #21
0
 public OrderService(IOrderRepository orderRepository,
                     IUserRepository userRepository,
                     ICartRepository cartRepository,
                     IOrderFactory factory)
 {
     this.orderRepository = orderRepository;
     this.userRepository = userRepository;
     this.cartRepository = cartRepository;
     this.factory = factory;
 }
コード例 #22
0
ファイル: OrderService.cs プロジェクト: kavaan/Shamane
 public OrderService(IOrderFactory orderFactory,
                     IUnitOfWork unitOfWork,
                     ICenterProductService centerProductService,
                     IUserService userService)
 {
     this.userService          = userService;
     this.centerProductService = centerProductService;
     this.unitOfWork           = unitOfWork;
     this.orderFactory         = orderFactory;
 }
コード例 #23
0
 public CreateOrderCommandHandler(
     IOrderFactory orderFactory,
     IOrderRepository orderRepository,
     IDishRepository dishRepository,
     ICurrentUser currentUser)
 {
     OrderFactory    = orderFactory;
     OrderRepository = orderRepository;
     DishRepository  = dishRepository;
     CurrentUser     = currentUser;
 }
コード例 #24
0
 public OrderService(
     IOrderRepository orderRepository,
     IProductRepository productRepository,
     IOrderFactory orderFactory,
     ICustomMapper customMapper)
 {
     this.orderRepository   = orderRepository;
     this.productRepository = productRepository;
     this.orderFactory      = orderFactory;
     this.customMapper      = customMapper;
 }
コード例 #25
0
 public OrderDomainService(
     DomainServiceParameters domainServiceParameters,
     ISystemUserFactory systemUserFactory,
     IOrderFactory orderFactory,
     IOrderIsValidToImportValidator orderIsValidToImportValidator
     ) : base(domainServiceParameters)
 {
     _systemUserFactory             = systemUserFactory;
     _orderFactory                  = orderFactory;
     _orderIsValidToImportValidator = orderIsValidToImportValidator;
 }
コード例 #26
0
 public EditOrderCommandHandler(
     IOrderRepository orderRepository,
     IProductReadonlyRepository productReadonlyRepository,
     IOrderFactory orderFactory,
     IMapper mapper)
 {
     _orderRepository           = orderRepository;
     _productReadonlyRepository = productReadonlyRepository;
     _orderFactory = orderFactory;
     _mapper       = mapper;
 }
コード例 #27
0
 /// <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;
 }
コード例 #28
0
ファイル: UpdateOrderUseCase.cs プロジェクト: optivem/demo
 public UpdateOrderUseCase(IMapper mapper,
                           IUnitOfWork unitOfWork,
                           IOrderRepository orderRepository,
                           IProductReadRepository productReadRepository,
                           IOrderFactory orderFactory)
 {
     _mapper                = mapper;
     _unitOfWork            = unitOfWork;
     _orderRepository       = orderRepository;
     _productReadRepository = productReadRepository;
     _orderFactory          = orderFactory;
 }
コード例 #29
0
        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");
        }
コード例 #30
0
 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;
 }
コード例 #31
0
ファイル: BaseTest.cs プロジェクト: atomiv/atomiv-samples
        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>();
        }
コード例 #32
0
 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;
 }
コード例 #33
0
ファイル: IFilterOrderTest.cs プロジェクト: kajnelissen/Sedat
        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);
        }
コード例 #34
0
        public EditorViewModel(IEventAggregator eventAggregator, IDirectoryManager directoryManager,
                               IOrderRepository orderRepository, IOrderFactory orderFactory)
        {
            _eventAggregator = eventAggregator;

            _orderRepository = orderRepository;

            _orderFactory = orderFactory;

            DirectoryManager = directoryManager;

            InitializeEvents(_eventAggregator);
        }
コード例 #35
0
        /// <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;
        }
コード例 #36
0
 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;
 }
コード例 #37
0
 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;
 }
コード例 #38
0
 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;
 }
コード例 #39
0
        /// <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;
        }
コード例 #40
0
        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")));
        }
コード例 #41
0
 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;
 }
コード例 #42
0
        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);
        }
コード例 #43
0
 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;
 }
コード例 #44
0
 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;
 }
コード例 #45
0
        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);
        }
コード例 #46
0
 public void SetUp()
 {
     _orderFactory = new OrderFactory();
 }
コード例 #47
0
ファイル: IFilterOrderTest.cs プロジェクト: kajnelissen/Sedat
 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);
 }
コード例 #48
0
ファイル: OrderInputWindow.cs プロジェクト: kajnelissen/Sedat
 public OrderInputWindow(ref IFilter filter)
 {
     InitializeComponent();
     this.orderFac = new DefaultOrderFactory();
     this.filter = filter;
 }
コード例 #49
0
 public GenericCreditCardPaymentMethod(IOrderFactory orderFactory)
     : this(LocalizationService.Current, orderFactory)
 {
 }
コード例 #50
0
 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)
 {
 }
コード例 #51
0
 public OrderListDataBinder(IOrderFactory orderFactory)
 {
     if (orderFactory == null)
         throw new ArgumentNullException("orderFactory");
     _orderFactory = orderFactory;
 }
コード例 #52
0
 public StartOrderCommand(IEventManager eventManager, IOrderFactory orderFactory)
 {
     _eventManager = eventManager;
     _orderFactory = orderFactory;
 }
コード例 #53
0
ファイル: Waiter.cs プロジェクト: CharlesNadolski/Practicum
 public Waiter(IReferenceData referenceData, IOrderFactory orderFactory)
 {
     _referenceData = referenceData;
     _referenceData.Load("ReferenceData.xml");
     _orderFactory = orderFactory;
 }
コード例 #54
0
ファイル: IFilterOrderTest.cs プロジェクト: kajnelissen/Sedat
 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);
 }
コード例 #55
0
 public CashOnDeliveryPaymentMethod(LocalizationService localizationService, IOrderFactory orderFactory)
     : base(localizationService)
 {
     _orderFactory = orderFactory;
 }
コード例 #56
0
ファイル: IFilterOrderTest.cs プロジェクト: kajnelissen/Sedat
 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);
 }
コード例 #57
0
 public CashOnDeliveryPaymentMethod(IOrderFactory orderFactory)
     : this(LocalizationService.Current, orderFactory)
 {
 }