public void InitTest()
		{
			base.InitDbContext();

			_backgroundService = Substitute.For<IBackgroundService>();
			_appraiserOrderRepository = new AppraiserOrderRepository(this.DbFactory);
			_orderRepository = new OrderRepository(this.DbFactory);
			_commitProvider = new CommitProvider(this.DbFactory);
			_userRepository = new UserRepository(this.DbFactory);
			_taskManager = new TaskManager(_backgroundService, _userRepository);
			_referenceManagement = new ReferenceManagement(new ReferenceRepository(this.DbFactory), new WebCacheService());
			_dateTimeManager = new DateTimeManager(_referenceManagement);
			_appraiserManagement = Substitute.For<IAppraiserManagement>();
			_configHelper = Substitute.For<IConfigurationHelper>();
			_orderManager = new OrderManager(
				_orderRepository,
				Substitute.For<IClientUserRepository>(),
				_referenceManagement,
				_appraiserManagement,
				_configHelper,
				Substitute.For<IAppraiserOrderRepository>(),
				Substitute.For<IChangeTrackingRepository>(),
				Substitute.For<IOrderHistoryManager>(),
				Substitute.For<IOrderDocumentsRepository>());

			_appraiserOrderDeliveryService = new AppraiserOrderDeliveryService(_taskManager, _appraiserOrderRepository, _commitProvider, _orderManager,
				new DateTimeManager(_referenceManagement), Substitute.For<IOrderHistoryManager>(), Substitute.For<IAppraiserOrderSetPointsRepository>(),
				Substitute.For<IAppraiserOrderListItemRepository>(),
				Substitute.For<IOrderPeriodicalNotificationManager>());
		}
Exemple #2
0
		public ContactInfoService(IOrderManager orderManager, IReferenceManagement referenceManagement)
		{
			if (orderManager == null) throw new ArgumentNullException("orderManager");

			_orderManager = orderManager;
			_addressManager = new AddressManager(referenceManagement);
		}
Exemple #3
0
		public ClientDashboardManager(IOrderRepository orderRepo, IAppraisalFormsService formService, IOrderManager orderManager, IClientUserOrdersRepository clientUserOrdersRepository)
		{
			_orderRepo = ValidationUtil.CheckOnNullAndThrowIfNull(orderRepo);
			_formsService = ValidationUtil.CheckOnNullAndThrowIfNull(formService);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_clientUserOrdersRepository = ValidationUtil.CheckOnNullAndThrowIfNull(clientUserOrdersRepository);
		}
        public OrderController(IOrderManager orderManager, OrderMapper orderMapper)
        {
            Require.NotNull(orderManager, nameof(orderManager));
            Require.NotNull(orderMapper, nameof(orderMapper));

            _orderManager = orderManager;
            _orderMapper = orderMapper;
        }
Exemple #5
0
		public ACIController(IOrderDocumentsService orderDocumentsService, IOrderFulfillmentService orderFulfillmentService, IOrderManager orderManager, IDocumentService documentService)
		{
			_orderDocumentsService = orderDocumentsService;
			_orderFulfillmentService = orderFulfillmentService;
			_documentService = documentService;
			_hotSpotDataFolder = new ConfigHelper().HotSpotDataFolder;
			_orderManager = orderManager;
		}
 public OrderCatalogViewModel(
         IOrderManager orderManager,
         ICustomerManager customerManager
     )
 {
     _orderManager = orderManager;
     _customerManager = customerManager;
 }
Exemple #7
0
		public CommunicationService(IOrderManager orderManager, ISecurityContext securityContext,
			IOrderHistoryManager orderHistoryManager, IOrderPeriodicalNotificationManager orderPeriodicalNotificationManager)
		{
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_securityContext = ValidationUtil.CheckOnNullAndThrowIfNull(securityContext);
			_orderHistoryManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderHistoryManager);
			_orderPeriodicalNotificationManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderPeriodicalNotificationManager);
		}
Exemple #8
0
		public ConditionsService(IOrderManager orderManager, IReferenceRepository referenceRepository, IOrderPeriodicalNotificationManager notificationManager, ISecurityContext securityContext, IOrderHistoryManager orderHistoryManager)
		{
			_orderManager = orderManager;
			_referenceRepository = referenceRepository;
			_notificationManager = notificationManager;
			_securityContext = securityContext;
			_orderHistoryManager = orderHistoryManager;
		}
Exemple #9
0
		public AvmRequestsService(IConfigurationHelper configurationHelper, ICommitProvider commitProvider, IAvmRequestsRepository avmRequestsRepository, ITaskManager taskManager, IOrderManager orderManager, IDocumentService documentService)
		{
			_configurationHelper = configurationHelper;
			_commitProvider = commitProvider;
			_avmRequestsRepository = avmRequestsRepository;
			_taskManager = taskManager;
			_orderManager = orderManager;
			_documentService = documentService;
		}
		public DeclinedOrderProcessingController(IOrderService orderService, IOrderManager orderManager, IDocumentService documentService, ICreditCardService creditCardService,
			ITaskManager taskManager, IAppraiserOrderDeliveryService appraiserOrderDeliveryService)
		{
			_orderService = orderService;
			_orderManager = orderManager;
			_documentService = documentService;
			_creditCardService = creditCardService;
			_taskManager = taskManager;
			_appraiserOrderDeliveryService = appraiserOrderDeliveryService;
		}
Exemple #11
0
		public OrderDocumentsService(IOrderDocumentsRepository orderDocumentsRepository, IReferenceManagement referenceManagement, ISecurityContext securityContext, IDocumentService documentService, IUsersManagement userManagement, IOrderManager orderManager, IOrderHistoryManager orderHistoryManager)
		{
			_orderDocumentsRepository = orderDocumentsRepository;
			_referenceManagement = referenceManagement;
			_securityContext = securityContext;
			_documentService = documentService;
			_userManagement = userManagement;
			_orderManager = orderManager;
			_orderHistoryManager = orderHistoryManager;
		}
        public DocumentGenerationService(IAppraiserUserService appraiserUserService, IReferenceManagement referenceManagement, IOrderManager orderManager, 
            IConfigurationHelper configManager, IGeneralInstructionManager generalInstructionManager, IAVMResponseManager avmResponseManager)
		{
			_appraiserUserService = appraiserUserService;
			_referenceManagement = referenceManagement;
			_orderManager = orderManager;
			_configManager = configManager;
			_generalInstructionManager = generalInstructionManager;
            _avmResponseManager = avmResponseManager;
		}
		public OrderPeriodicalNotificationTask(IMailManager mailManager,
																					IConfigurationHelper configurationHelper,
																					IOrderPeriodicalNotificationManager orderPeriodicalManager,
																					IOrderManager orderManager
																					)
		{
			_mailManager = ValidationUtil.CheckOnNullAndThrowIfNull(mailManager);
			_configurationHelper = ValidationUtil.CheckOnNullAndThrowIfNull(configurationHelper);
			_orderPeriodicalManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderPeriodicalManager);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
		}
		public OrderDocumentsServiceTest()
		{
			_orderDocumentsRepository = Substitute.For<IOrderDocumentsRepository>();
			_referenceManagement = Substitute.For<IReferenceManagement>();
			_securityContext = Substitute.For<ISecurityContext>();
			_userManagement = Substitute.For<IUsersManagement>();
			_documentService = Substitute.For<IDocumentService>();
			_orderManager = Substitute.For<IOrderManager>();
			_orderHistoryManager = Substitute.For<IOrderHistoryManager>();
			_target = new OrderDocumentsService(_orderDocumentsRepository, _referenceManagement, _securityContext, _documentService, _userManagement, _orderManager, _orderHistoryManager);
		}
Exemple #15
0
		public OrderAssignmentService(IAppraiserUserRepository appraiserUserRepository, IOrderManager orderManager, ITaskManager taskManager,
			DateTimeManager dateTimeManager, IAppraiserOrderDeliveryService appraiserOrderDeliveryService, IConfigurationHelper configurationHelper,
			IAppraiserOrderRepository appraiserOrderRepository)
		{
			_appraiserUserRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserUserRepository);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
			_dateTimeManager = ValidationUtil.CheckOnNullAndThrowIfNull(dateTimeManager);
			_appraiserOrderDeliveryService = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderDeliveryService);
			_configurationHelper = ValidationUtil.CheckOnNullAndThrowIfNull(configurationHelper);
			_appraiserOrderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderRepository);
		}
Exemple #16
0
		public void InitTest()
		{
			base.InitDbContext();
			_commitProviderInstance = new CommitProvider(this.DbFactory);
			_avmRequestsRepository = new AvmRequestsRepository(this.DbFactory);
			_configurationHelper = new ConfigHelper();
			_taskManager = Substitute.For<ITaskManager>();
			_orderManager = Substitute.For<IOrderManager>();
			_documentService = Substitute.For<IDocumentService>();

			_avmRequestsService = new AvmRequestsService(_configurationHelper, _commitProviderInstance, _avmRequestsRepository, _taskManager, _orderManager, _documentService);
		}
Exemple #17
0
 public OrderAppService(
     INewOrderGenerator newOrderGenerator,
     IProductAppService productAppService,
     IProductDetailAppService productDetailAppService,
     IOrderManager orderManager,
     IOrderRepository repository) : base(repository)
 {
     _newOrderGenerator       = newOrderGenerator;
     _productAppService       = productAppService;
     _productDetailAppService = productDetailAppService;
     _orderManager            = orderManager;
     _repository = repository;
 }
Exemple #18
0
        public void Setup()
        {
            var serviceCollection = new ServiceCollection();

            ConfigureServices(serviceCollection);
            var _serviceProvider = serviceCollection.BuildServiceProvider();

            _orderManager = _serviceProvider.GetService <IOrderManager>();
            _calc         = _serviceProvider.GetService <ICalc>();
            _order        = _serviceProvider.GetService <IOrder>();
            _item         = _serviceProvider.GetService <IDealItem>();
            _fixture      = new Fixture();
        }
        public void MyOrders_IsNotAuthenticated_ShouldRedirectToLoginPage(IOrderManager orderManager, IContactFactory contactFactory, ILogger logger, HttpContextBase httpContextBase)
        {
            // arrange
            Context.Items["__visitorContext"] = new MockVisitorContext("1", "fake", "1");
            var controller = new AccountController(new MockAccountManager(), contactFactory, logger, new MockAccountRepository());

            // act
            var result = controller.MyOrders();

            // assert
            result.As <RedirectResult>().Should().NotBeNull();
            result.As <RedirectResult>().Url.Should().Be("/login");
        }
Exemple #20
0
		public RequestDetailsController(
			IRequestDetailsService requestDetailsService,
			ILetterOfEngagementService letterOfEngagementService,
			IOrderManager orderManager,
			IAppraiserUserService appraiserService,
			IAppraiserOrderDeliveryService orderDeliveryService)
		{
			_requestDetailsService = ValidationUtil.CheckOnNullAndThrowIfNull(requestDetailsService);
			_letterOfEngagementService = ValidationUtil.CheckOnNullAndThrowIfNull(letterOfEngagementService);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_appraiserService = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserService);
			_orderDeliveryService = ValidationUtil.CheckOnNullAndThrowIfNull(orderDeliveryService);
		}
Exemple #21
0
 public OrderAppService(
     INewOrderGenerator newOrderGenerator,
     IProductAppService productAppService,
     IPurchasableChecker purchasableChecker,
     IOrderManager orderManager,
     IOrderRepository repository) : base(repository)
 {
     _newOrderGenerator  = newOrderGenerator;
     _productAppService  = productAppService;
     _purchasableChecker = purchasableChecker;
     _orderManager       = orderManager;
     _repository         = repository;
 }
        public SingleThreadMarket(IDataFeed dataFeed, IOrderManager orderManager)
        {
            _dataFeed = dataFeed;
            _orderManager = orderManager;

            _dataFeed.Second += time =>
            {
                lock (_syncRoot)
                {
                    if (Second != null) Second(time);
                }
            };
        }
Exemple #23
0
 public NewOrderViewModelFactory(
     IDispatcherHelper dispatcherHelper,
     IQueueProcessor queueProcessor,
     IFindSymbolService findSymbolService,
     IOrderCalculationService orderCalculationService,
     IOrderManager orderManager)
 {
     _dispatcherHelper        = dispatcherHelper;
     _queueProcessor          = queueProcessor;
     _findSymbolService       = findSymbolService;
     _orderCalculationService = orderCalculationService;
     _orderManager            = orderManager;
 }
 public OrdersController(
     IAccountManager accountManager,
     IProfileManager profileManager,
     IOrderManager orderManager,
     ITaskManager taskManager,
     ITagManager tagManager)
 {
     _accountManager = accountManager ?? throw new ArgumentNullException(nameof(accountManager));
     _profileManager = profileManager ?? throw new ArgumentNullException(nameof(profileManager));
     _taskManager    = taskManager ?? throw new ArgumentNullException(nameof(taskManager));
     _orderManager   = orderManager ?? throw new ArgumentNullException(nameof(orderManager));
     _tagManager     = tagManager ?? throw new ArgumentNullException(nameof(tagManager));
 }
 public ProductInventoryReductionEventHandler(
     IClock clock,
     ICurrentTenant currentTenant,
     IOrderManager orderManager,
     IOrderRepository orderRepository,
     IDistributedEventBus distributedEventBus)
 {
     _clock               = clock;
     _currentTenant       = currentTenant;
     _orderManager        = orderManager;
     _orderRepository     = orderRepository;
     _distributedEventBus = distributedEventBus;
 }
        /// <summary>
        /// 构造函数
        /// </summary>
        public OrderAppService(
            IRepository <Order, Guid> orderRepository
            , IOrderManager orderManager
            , IRepository <Activity, Guid> activityRepository
            , IRepository <UserInfo, Guid> userinfoRepository

            )
        {
            _orderRepository    = orderRepository;
            _orderManager       = orderManager;
            _activityRepository = activityRepository;
            _userinfoRepository = userinfoRepository;
        }
Exemple #27
0
 public CheckoutRepository(
     IOrderManager orderManager,
     ICartManager cartManager,
     ICatalogRepository catalogRepository,
     IAccountManager accountManager,
     ICartModelBuilder cartModelBuilder,
     IEntityMapper entityMapper,
     IStorefrontContext storefrontContext,
     IVisitorContext visitorContext)
     : base(cartManager, catalogRepository, accountManager, cartModelBuilder, entityMapper, storefrontContext, visitorContext)
 {
     this.OrderManager = orderManager;
 }
Exemple #28
0
 public OrderForm(ICustomerManager customerManager, ILawyerManager lawyerManager, IOrderManager orderManager, IServiceManager serviceManager)
 {
     this.customerManager = customerManager;
     this.lawyerManager = lawyerManager;
     this.orderManager = orderManager;
     this.serviceManager = serviceManager;
     this.serviceOfOrder = new List<Service>();
     this.InitializeComponent();
     this.FillCustomerTable();
     this.FillLawyerTable();
     this.FillServiceTable();
     this.FillOrderTable();
 }
Exemple #29
0
 public OrderController(
     IOrderManager orderManager,
     IProductManager productManager,
     IPromoCodeManager promoCodeManager,
     ICartService cartService,
     ICalcService calcService)
 {
     _orderManager     = orderManager ?? throw new ArgumentNullException(nameof(orderManager));
     _productManager   = productManager ?? throw new ArgumentNullException(nameof(productManager));
     _promoCodeManager = promoCodeManager ?? throw new ArgumentNullException(nameof(promoCodeManager));
     _cartService      = cartService ?? throw new ArgumentNullException(nameof(cartService));
     _calcService      = calcService ?? throw new ArgumentNullException(nameof(calcService));
 }
        public void Setup()
        {
            this.tradingData  = new TradingDataContext();
            this.signalQueue  = new ObservableQueue <Signal>();
            this.orderQueue   = new ObservableQueue <Order>();
            this.orderManager = new MockOrderManager();
            this.tb           = new TraderBase(this.tradingData,
                                               this.signalQueue,
                                               this.orderQueue,
                                               this.orderManager,
                                               new AlwaysTimeToTradeSchedule(),
                                               new NullLogger());

            StrategyHeader strategyHeader = new StrategyHeader(1, "Strategy Description", "BP12345-RF-01", "RTS-9.13_FT", 10);

            this.tradingData.Get <ICollection <StrategyHeader> >().Add(strategyHeader);

            StopPointsSettings spSettings = new StopPointsSettings(strategyHeader, 50, false);

            this.tradingData.Get <ICollection <StopPointsSettings> >().Add(spSettings);

            StopLossOrderSettings sloSettings = new StopLossOrderSettings(strategyHeader, 100);

            this.tradingData.Get <ICollection <StopLossOrderSettings> >().Add(sloSettings);

            ProfitPointsSettings ppSettings = new ProfitPointsSettings(strategyHeader, 100, false);

            this.tradingData.Get <ICollection <ProfitPointsSettings> >().Add(ppSettings);

            TakeProfitOrderSettings tpoSettings = new TakeProfitOrderSettings(strategyHeader, 100);

            this.tradingData.Get <ICollection <TakeProfitOrderSettings> >().Add(tpoSettings);

            StrategyStopLossByPointsOnTick stopLossHandler =
                new StrategyStopLossByPointsOnTick(strategyHeader, this.tradingData, this.signalQueue, new NullLogger());
            StrategyTakeProfitByPointsOnTick takeProfitHandler =
                new StrategyTakeProfitByPointsOnTick(strategyHeader, this.tradingData, this.signalQueue, new NullLogger());

            PlaceStrategyStopLossByPointsOnTrade placeStopOnTradeHandler =
                new PlaceStrategyStopLossByPointsOnTrade(strategyHeader, this.tradingData, this.signalQueue, new NullLogger());
            PlaceStrategyTakeProfitByPointsOnTrade placeTakeProfitOnTradeHandler =
                new PlaceStrategyTakeProfitByPointsOnTrade(strategyHeader, this.tradingData, this.signalQueue, new NullLogger());


            Assert.AreEqual(0, this.tradingData.Get <IEnumerable <Signal> >().Count());
            Assert.AreEqual(0, this.tradingData.Get <IEnumerable <Order> >().Count());
            Assert.AreEqual(0, this.tradingData.Get <IEnumerable <Trade> >().Count());
            Assert.AreEqual(0, this.tradingData.Get <IEnumerable <Position> >().Count());
            Assert.AreEqual(0, this.signalQueue.Count);
            Assert.AreEqual(0, this.orderQueue.Count);
        }
Exemple #31
0
    public void setup()
    {
        // creates the remote object
        om            = (IOrderManager)RemoteNew.New(typeof(IOrderManager));
        orderRepeater = new Repeater();
        switch (cType)
        {
        case CookType.Kitchen:
            orderRepeater.newOrderKitchen += new newOrderKitchenDelegate(newOrderHandler);
            om.newOrderKitchenEvent       += new newOrderKitchenDelegate(orderRepeater.newOrderKitchenRepeater);
            break;

        case CookType.Bar:
            orderRepeater.newOrderBar += new newOrderBarDelegate(newOrderHandler);
            om.newOrderBarEvent       += new newOrderBarDelegate(orderRepeater.newOrderBarRepeater);
            break;

        default:
            if (Program.debug)
            {
                Console.WriteLine("OOPS");
            }
            break;
        }

        orderRepeater.orderChanged += new orderChangedDelegate(orderChangedHandler);
        om.orderChangedEvent       += new orderChangedDelegate(orderRepeater.orderChangedRepeater);

        mf.addInitialOrders(om.getAllDestination(cType));
        if (Program.debug)
        {
            Console.WriteLine("Setup was made");
        }


        switch (cType)
        {
        case CookType.Bar:
            mf.Text = "CookClient - Bar";
            break;

        case CookType.Kitchen:
            mf.Text = "CookClient - Kitchen";
            break;

        default:
            mf.Text = "CookClient";
            break;
        }
        mf.Show();
    }
Exemple #32
0
        /// <summary>
        /// Gets the orders count.
        /// </summary>
        /// <param name="query">The query.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The orders count.</returns>
        public int GetCount(Query query, ServiceClientArgs args)
        {
            Assert.ArgumentNotNull(query, "query");

            SiteContext site = Utils.GetExistingSiteContext(args);

            using (new SiteContextSwitcher(site))
            {
                IOrderManager <Order> orderManager = Context.Entity.Resolve <IOrderManager <Order> >();
                Utils.SetCustomerId(args, orderManager);

                return(orderManager.GetOrdersCount(query));
            }
        }
Exemple #33
0
 /// <summary>
 /// ProductSecretKey的构造方法
 ///</summary>
 public ProductSecretKeyManager(
     IRepository <ProductSecretKey, Guid> repository,
     AbpUserManager <Role, User> userManager,
     IUserDownloadConfigManager userDownloadConfigManager,
     IProductManager productManager,
     IOrderManager orderManager
     )
 {
     _repository  = repository;
     _userManager = userManager;
     _userDownloadConfigManager = userDownloadConfigManager;
     _productManager            = productManager;
     _orderManager = orderManager;
 }
 public HomeController(IBranchManager iBranchManager, IClientManager iClientManager, IOrderManager iOrderManager, IReportManager iReportManager, IEmployeeManager iEmployeeManager, IInventoryManager iInventoryManager, ICommonManager iCommonManager, IRegionManager iRegionManager, ITerritoryManager iTerritoryManager, IAccountsManager iAccountsManager, IDivisionGateway iDivisionGateway)
 {
     _iBranchManager    = iBranchManager;
     _iClientManager    = iClientManager;
     _iOrderManager     = iOrderManager;
     _iReportManager    = iReportManager;
     _iEmployeeManager  = iEmployeeManager;
     _iInventoryManager = iInventoryManager;
     _iCommonManager    = iCommonManager;
     _iRegionManager    = iRegionManager;
     _iTerritoryManager = iTerritoryManager;
     _iAccountsManager  = iAccountsManager;
     _iDivisionGateway  = iDivisionGateway;
 }
        public void Register_ModelNotInitialized_ShouldReturnException(Database db, IOrderManager orderManager, IContactFactory contactFactory, ILogger logger, HttpContextBase httpContextBase)
        {
            // arrange
            FakeSiteContext.Database = db;
            var controller = new AccountController(new MockAccountManager(), contactFactory, logger, new MockAccountRepository());

            // act
            var result = controller.Register(null);

            // assert
            result.As <JsonResult>().Should().NotBeNull();
            result.As <JsonResult>().Data.As <Base.Models.JsonResults.BaseJsonResult>().Errors.Count.Should().BeGreaterThan(0);
            result.As <JsonResult>().Data.As <Base.Models.JsonResults.BaseJsonResult>().Success.Should().BeFalse();
        }
        public TestIOrderManager()
        {
            _dataProviderMock = new Mock <IDataProvider>();
            _kafkaSettings    = new Mock <IOptions <KafkaSettings> >();
            _pubSubProvider   = new Mock <IPubSubProvider>();
            _deadlineManager  = new Mock <IDeadlineManager>();

            _dataProviderMock = new Mock <IDataProvider>();
            _orderManager     = new OrderManager(_dataProviderMock.Object, _pubSubProvider.Object, _kafkaSettings.Object, _deadlineManager.Object);
            _order            = new Order()
            {
                EventID = "TestEventID", OrderId = "TestOrderId", OrderSubmitTime = DateTime.Now, Username = Guid.NewGuid().ToString(), ValueA = "TestValueA", ValueB = "TestValueB"
            };
        }
        public void Register_ModelNotInitialized_ShouldNotReturnSuccess(Database db, IOrderManager orderManager, IContactFactory contactFactory, ILogger logger, HttpContextBase httpContextBase)
        {
            // arrange
            FakeSiteContext.Database = db;
            var controller = new AccountController(new MockAccountManager(), contactFactory, logger, new MockAccountRepository());

            // act
            var result = controller.Register(new RegisterUserInputModel());

            // assert
            result.As <JsonResult>().Should().NotBeNull();
            result.As <JsonResult>().Data.As <RegisterBaseJsonResult>().Should().NotBeNull();
            result.As <JsonResult>().Data.As <RegisterBaseJsonResult>().Success.Should().BeFalse();
        }
Exemple #38
0
 public MasterManager(
     IOrderManager orderManager,
     IDelivererManager delivererManager,
     IBusinessManager businessManager,
     IBusinessCashierManager businessCashierManager,
     IBusinessOwnerManager businessOwnerManager
     )
 {
     _orderManager           = orderManager;
     _delivererManager       = delivererManager;
     _businessManager        = businessManager;
     _businessCashierManager = businessCashierManager;
     _businessOwnerManager   = businessOwnerManager;
 }
 public OrderController(IOrderManager orderDbContext
                        , UserManager <ApplicationUser> userManager
                        , IUserManager iUserManager
                        , IAgentManager agentManager
                        , IHubContext <NotificationSender> messageContext
                        , INotification notification)
 {
     this.orderDbContext = orderDbContext;
     this.userManager    = userManager;
     this.agentManager   = agentManager;
     this.iUserManager   = iUserManager;
     this.messageContext = messageContext;
     this.notification   = notification;
 }
Exemple #40
0
		public RequestDetailsService(IOrderManager orderManager, IReferenceManagement referenceManagement, ISecurityContext securityContext, IAppraiserOrderDeliveryService appraiserOrderDeliveryService, IReportManager reportManager)
		{
			if (orderManager == null) throw new ArgumentNullException("orderManager");
			if (referenceManagement == null) throw new ArgumentNullException("referenceManagement");
			if (securityContext == null) throw new ArgumentNullException("securityContext");
			if (appraiserOrderDeliveryService == null) throw new ArgumentNullException("appraiserOrderDeliveryService");
			if (reportManager == null) throw new ArgumentNullException("reportManager");

			_orderManager = orderManager;
			_referenceManagement = referenceManagement;
			_securityContext = securityContext;
			_appraiserOrderDeliveryService = appraiserOrderDeliveryService;
			_reportManager = reportManager;
		}
		public AppraiserOrderDeliveryService(ITaskManager taskManager, IAppraiserOrderRepository appraiserOrderRepository,
			ICommitProvider commitProvider, IOrderManager orderManager, DateTimeManager dateTimeManager, IOrderHistoryManager orderHistoryManager,
			IAppraiserOrderSetPointsRepository appraiserOrderSetPointsRepository, IAppraiserOrderListItemRepository appraiserOrderListItemRepository,
			IOrderPeriodicalNotificationManager orderPeriodicalNotificationManager)
		{
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
			_appraiserOrderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderRepository);
			_commitProvider = ValidationUtil.CheckOnNullAndThrowIfNull(commitProvider);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_dateTimeManager = ValidationUtil.CheckOnNullAndThrowIfNull(dateTimeManager);
			_orderHistoryManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderHistoryManager);
			_appraiserOrderSetPointsRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderSetPointsRepository);
			_appraiserOrderListItemRepository = ValidationUtil.CheckOnNullAndThrowIfNull(appraiserOrderListItemRepository);
			_orderPeriodicalNotificationManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderPeriodicalNotificationManager);
		}
        public void MyOrder_IsAuthenticated_ShouldRedirectToOrdersPage(IOrderManager orderManager, IContactFactory contactFactory, ILogger logger, HttpContextBase httpContextBase)
        {
            // arrange
            var controller = new AccountController(new MockAccountManager(), contactFactory, logger, new MockAccountRepository());

            using (new Sitecore.Security.Accounts.UserSwitcher("fake", true))
            {
                // act
                var result = controller.MyOrder("fake");

                // assert
                result.As <RedirectResult>().Should().BeNull();
                result.As <ActionResult>().Should().NotBeNull();
            }
        }
Exemple #43
0
        public TraderBaseInitializer()
        {
            this.tradingData  = SampleTradingDataContextFactory.Make();
            this.signalQueue  = new ObservableQueue <Signal>();
            this.orderQueue   = new ObservableQueue <Order>();
            this.orderManager = new MockOrderManager();

            this.traderBase =
                new TraderBase(this.tradingData,
                               this.signalQueue,
                               this.orderQueue,
                               this.orderManager,
                               new AlwaysTimeToTradeSchedule(),
                               new NullLogger());
        }
Exemple #44
0
 public NewOrderViewModel(
     IDispatcherHelper dispatcherHelper,
     IQueueProcessor queueProcessor,
     IFindSymbolService findSymbolService,
     IOrderCalculationService orderCalculationService,
     IOrderManager orderManager)
     : base(dispatcherHelper, queueProcessor)
 {
     Symbol.PropertyChanged  += OnSymbolPropertyChanged;
     _findSymbolService       = findSymbolService;
     _orderCalculationService = orderCalculationService;
     _orderManager            = orderManager;
     Messenger.Default.Register <AccountSummary>(this, msg => _accountId = msg.AccountId);
     Messenger.Default.Register <OrderStatusChangedMessage>(this, OrderStatusChangedMessage.Tokens.Orders, OnOrderStatusChangedMessage);
 }
Exemple #45
0
        public OrderViewModel(IMessageBoxService messageBoxService, IOrderManager manager, ITableManager tableManager) : base(messageBoxService, manager)
        {
            // do initialization
            try
            {
                if (tableManager == null)
                {
                    throw new ArgumentNullException("tableManager");
                }
                _tableManager = tableManager;
                // populate the list of tables
                this.FreeTableList = _tableManager.GetFreeTables();

                _productGroupManager  = new ProductGroupManager();
                this.ProductGroupList = _productGroupManager.GetList();
                // add one item, in case user select all group
                this.ProductGroupList.Insert(0, new ProductGroup
                {
                    Id          = -1,
                    Code        = "ALL",
                    Name        = "All",
                    Description = "List of all products"
                });

                _productManager           = new ProductManager();
                this.AvailableProductList = _productManager.GetList();

                // initialize command
                this.AddOrderItemCommand      = new CommandBase <Product>(o => this.ExecuteAddOrderItemCommand(o), o => this.CanExecuteAddOrderItemCommand(o));
                this.CancelOrderItemCommand   = new CommandBase <OrderItem>(o => this.ExecuteCancelOrderItemCommand(o), o => this.CanExecuteCancelOrderItemCommand(o));
                this.UnCancelOrderItemCommand = new CommandBase <OrderItem>(o => this.ExecuteUnCancelOrderItemCommand(o), o => this.CanExecuteUnCancelOrderItemCommand(o));
                this.IncreaseQuantityCommand  = new CommandBase <OrderItem>(o => this.ExecuteIncreaseQuantityCommand(o), o => this.CanExecuteIncreaseQuantityCommand(o));
                this.DecreaseQuantityCommand  = new CommandBase <OrderItem>(o => this.ExecuteDecreaseQuantityCommand(o), o => this.CanExecuteDecreaseQuantityCommand(o));

                this.SelectProductGroupCommand   = new CommandBase <ProductGroup>(o => this.ExecuteSelectProductGroupCommand(o), o => this.CanExecuteSelectProductGroupCommand(o));
                this.ShowCancelledProductCommand = new CommandBase <object>(o => this.ExecuteShowCancelledProductCommand());

                this.DisplayName = "Create Order";

                // temporarily
                Item.CreatorId   = GlobalObjects.SystemUser.Id;
                Item.CreatorUser = GlobalObjects.SystemUser;
            }
            catch (Exception ex)
            {
                this.MessageBoxService.ShowError(this.GetType().FullName + System.Reflection.MethodBase.GetCurrentMethod().Name + ": " + ex.Message);
            }
        }
Exemple #46
0
 public CheckoutRepository(
     IAccountManager accountManager,
     IContactFactory contactFactory,
     ICartManager cartManager,
     IOrderManager orderManager,
     IPaymentManager paymentManager,
     IShippingManager shippingManager,
     IProductResolver productResolver)
     : base(accountManager, contactFactory)
 {
     this._cartManager     = cartManager;
     this._orderManager    = orderManager;
     this._paymentManager  = paymentManager;
     this._shippingManager = shippingManager;
     _productResolver      = productResolver;
 }
Exemple #47
0
        /// <summary>
        /// Gets the data.
        /// </summary>
        /// <param name="orderNumber">The order number.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The string.</returns>
        public virtual DataTable Get(string orderNumber, ServiceClientArgs args)
        {
            Assert.ArgumentNotNullOrEmpty(orderNumber, "orderNumber");

            SiteContext site = Utils.GetExistingSiteContext(args);

            using (new SiteContextSwitcher(site))
            {
                IOrderManager <Order> orderManager = Context.Entity.Resolve <IOrderManager <Order> >();
                Utils.SetCustomerId(args, orderManager);

                Order order = orderManager.GetOrder(orderNumber);

                return(this.OrderConvertor.DomainModelToDTO(order));
            }
        }
Exemple #48
0
        public static void Main(string[] args)
        {
            _orderMan = ServiceManager.GetService <IOrderManager>("OrderManager", true);
            Thread thread = new Thread(new ThreadStart(CheckDateThread));

            thread.Start();

            var config = new ConfigurationBuilder()
                         .SetBasePath(Directory.GetCurrentDirectory())
                         .AddJsonFile("hosting.json", optional: true)
                         .Build();

            BuildWebHost(args, config).Run();

            isStop = true;
        }
 public OICatalogViewModel(
         IOrderItemManager orderItemManager,
         IOrderManager orderManager,
         IPackageManager packageManager,
         IProductManager productManager,
         IPriceManager priceManager,
         ICustomerManager customerManager
     )
 {
     _orderItemManager = orderItemManager;
     _orderManager = orderManager;
     _packageManager = packageManager;
     _productManager = productManager;
     _priceManager = priceManager;
     _customerManager = customerManager;
 }
Exemple #50
0
        /// <summary>
        /// Gets the by query.
        /// </summary>
        /// <param name="query">The query.</param>
        /// <param name="pageIndex">Index of the page.</param>
        /// <param name="pageSize">Size of the page.</param>
        /// <param name="args">The arguments.</param>
        /// <returns>The orders.</returns>
        public DataTable GetRangeByQuery(Query query, int pageIndex, int pageSize, ServiceClientArgs args)
        {
            Assert.ArgumentNotNull(query, "query");

            SiteContext site = Utils.GetExistingSiteContext(args);

            using (new SiteContextSwitcher(site))
            {
                IOrderManager <Order> orderManager = Context.Entity.Resolve <IOrderManager <Order> >();
                Utils.SetCustomerId(args, orderManager);

                IEnumerable <Order> orders = orderManager.GetOrders(query, pageIndex, pageSize);

                return(this.OrderConvertor.DomainModelToDTO(orders));
            }
        }
Exemple #51
0
 public ShipmentAppService(IShipmentManager shipmentManager,
                           IOrderManager orderManager,
                           ILocalizationManager localizationManager,
                           ICacheManager cacheManager,
                           IShipmentTracker shipmentTracker,
                           ILogisticsManager logisticsManager,
                           IOrderProcessingManager orderProcessingManager)
 {
     this._shipmentManager        = shipmentManager;
     this._orderManager           = orderManager;
     this._cacheManager           = cacheManager;
     this._localizationManager    = localizationManager;
     this._shipmentTracker        = shipmentTracker;
     this._logisticsManager       = logisticsManager;
     this._orderProcessingManager = orderProcessingManager;
 }
Exemple #52
0
		public void InitTest()
		{
			base.InitDbContext();

			_appraiserUserRepository = new AppraiserUserRepository(this.DbFactory);
			_orderRepository = new OrderRepository(this.DbFactory);
			_appraiserOrderDeliveryService = Substitute.For<IAppraiserOrderDeliveryService>();
			_orderManager = new OrderManager(_orderRepository, Substitute.For<IClientUserRepository>(), Substitute.For<IReferenceManagement>(),
				Substitute.For<IAppraiserManagement>(), Substitute.For<IConfigurationHelper>(),
				Substitute.For<IAppraiserOrderRepository>(), Substitute.For<IChangeTrackingRepository>(), Substitute.For<IOrderHistoryManager>(),
				Substitute.For<IOrderDocumentsRepository>());
			_taskManager = Substitute.For<ITaskManager>();

			_orderAssignmentService = new OrderAssignmentService(_appraiserUserRepository, _orderManager, _taskManager,
				new DateTimeManager(Substitute.For<IReferenceManagement>()), _appraiserOrderDeliveryService,
				Substitute.For<IConfigurationHelper>(), Substitute.For<IAppraiserOrderRepository>());
		}
        public ExceptionHandlingMarket(IDataFeed dataFeed, IOrderManager orderManager, Action<Exception> handler)
        {
            _handler = handler;
            _dataFeed = dataFeed;
            _orderManager = orderManager;

            _dataFeed.Second += time =>
            {
                try
                {
                    if (Second != null) Second(time);
                }
                catch (Exception ex)
                {
                    _handler(ex);
                }
            };
        }
		public OrderFulfillmentServiceTest()
		{
			_appraiserOrderRepository = Substitute.For<IAppraiserOrderRepository>();
			_clientDashboardService = Substitute.For<IClientDashboardService>();
			_clientManager = Substitute.For<IClientUserManager>();
			_orderRepository = Substitute.For<IOrderRepository>();
			_formsService = Substitute.For<IAppraisalFormsService>();
			_securityContext = Substitute.For<ISecurityContext>();
			_refManager = Substitute.For<IReferenceManagement>();
			_orderManager = Substitute.For<IOrderManager>();
			_changeTrackingRepository = Substitute.For<IChangeTrackingRepository>();
			_userManager = Substitute.For<IUsersManagement>();
			_orderHistoryManager = Substitute.For<IOrderHistoryManager>();
			_avmRequestsService = Substitute.For<IAvmRequestsService>();
			_taskManager = Substitute.For<ITaskManager>();
			_orderPeriodicalNotificationManager = Substitute.For<IOrderPeriodicalNotificationManager>();
			_target = new OrderFulfillmentService(_orderManager, _appraiserOrderRepository, _clientDashboardService, _clientManager,
				_orderRepository, _formsService, _securityContext, _refManager, _changeTrackingRepository, _userManager, _orderHistoryManager,
				_avmRequestsService, _taskManager, _orderPeriodicalNotificationManager);
		}
Exemple #55
0
		public OrderService(IOrderRepository orderRepository,
			IReferenceManagement referenceManagement,
			IGeocodingDataService geocodingDataService, ITaskManager taskManager, IOrderManager orderManager,
			IAppraisalFormsService appFormsService, IClientDashboardService dashboarService, IConfigurationHelper configurationHelper,
			ICryptographicProvider cryptographicProvider, IDocumentService documentService, IReportManager reportManager, ISecurityContext securityContext,
			IOrderDocumentsRepository orderDocumentsRepository)
		{
			_orderRepository = ValidationUtil.CheckOnNullAndThrowIfNull(orderRepository);
			_referenceManager = ValidationUtil.CheckOnNullAndThrowIfNull(referenceManagement);
			_geocodingDataService = ValidationUtil.CheckOnNullAndThrowIfNull(geocodingDataService);
			_taskManager = ValidationUtil.CheckOnNullAndThrowIfNull(taskManager);
			_orderManager = ValidationUtil.CheckOnNullAndThrowIfNull(orderManager);
			_appFormsService = ValidationUtil.CheckOnNullAndThrowIfNull(appFormsService);
			_dashboarService = ValidationUtil.CheckOnNullAndThrowIfNull(dashboarService);
			_configurationHelper = ValidationUtil.CheckOnNullAndThrowIfNull(configurationHelper);
			_cryptographicProvider = ValidationUtil.CheckOnNullAndThrowIfNull(cryptographicProvider);
			_documentService = ValidationUtil.CheckOnNullAndThrowIfNull(documentService);
			_reportManager = ValidationUtil.CheckOnNullAndThrowIfNull(reportManager);
			_securityContext = ValidationUtil.CheckOnNullAndThrowIfNull(securityContext);
			_orderDocumentsRepository = ValidationUtil.CheckOnNullAndThrowIfNull(orderDocumentsRepository);

			_addressManager = new AddressManager(_referenceManager);
			_dateTimeManager = new DateTimeManager(_referenceManager);
		}
		public RebuttalTabDataControllerPlugin(ISecurityContext securityContext, IOrderManager orderManager)
		{
			_securityContext = securityContext;
			_orderManager = orderManager;
		}
    void setup()
    {
        om = (IOrderManager)RemoteNew.New(typeof(IOrderManager));

        //Listen to any order that has changed
        orderRepeater = new Repeater();
        orderRepeater.orderChanged += new orderChangedDelegate(orderChangedHandler);
        om.orderChangedEvent += new orderChangedDelegate(orderRepeater.orderChangedRepeater);

        //Listen to new kitchen orders
        orderRepeater.newOrderKitchen += new newOrderKitchenDelegate(newOrderHandler);
        om.newOrderKitchenEvent += new newOrderKitchenDelegate(orderRepeater.newOrderKitchenRepeater);

        //Listen to new bar orders
        orderRepeater.newOrderBar += new newOrderBarDelegate(newOrderHandler);
        om.newOrderBarEvent += new newOrderBarDelegate(orderRepeater.newOrderKitchenRepeater);

        //Listen to removed orders
        orderRepeater.tableRemoved += new tableRemovedDelegate(removedTableHandler);
        om.tableRemovedEvent += new tableRemovedDelegate(orderRepeater.tableRemovedRepeater);

        setupTables(om.getAllOrders());
        if (Program.debug) Console.WriteLine("Setup was made");
    }
		public OrderFulfillmentSecurityControllerPlugin(IOrderManager orderManager, IEnumerable<IOrderAccessSecurity> orderAccessSecurities, ISecurityContext securityContext)
		{
			_orderManager = orderManager;
			_orderAccessSecurities = orderAccessSecurities;
			_securityContext = securityContext;
		}
Exemple #59
0
 public OrderController(IOrderManager orderManager)
 {
     _orderManager = orderManager;
 }
Exemple #60
0
 /// <summary>
 /// BookingManager Constructor
 /// </summary>
 /// <param name="existingAvailabilityManager">An override for the default 'spawn new manager' behaviour</param>
 /// <param name="existingOrderManager">An override for the default 'spawn new Order Manager' behaviour</param>
 public BookingManager(IAvailabilityManager existingAvailabilityManager = null, IOrderManager existingOrderManager = null)
 {
     availabilityManager = existingAvailabilityManager ?? new AvailabilityManager(existingBookingManager: this);
     orderManager = existingOrderManager ?? new OrderManager(existingBookingManager: this, existingAvailabilityManager: availabilityManager);
     emailManager = new EmailManager();
 }