public UploadTradeFileMonitor(
     IUploadConfiguration uploadConfiguration,
     IReddeerDirectory directory,
     IUploadTradeFileProcessor fileProcessor,
     IEnrichmentService enrichmentService,
     IOrdersRepository ordersRepository,
     IFileUploadOrdersRepository fileUploadOrdersRepository,
     IUploadCoordinatorMessageSender fileUploadMessageSender,
     ISystemProcessContext systemProcessContext,
     IOmsVersioner omsVersioner,
     ILogger <UploadTradeFileMonitor> logger)
     : base(directory, logger, "Upload Trade File Monitor")
 {
     this._uploadConfiguration =
         uploadConfiguration ?? throw new ArgumentNullException(nameof(uploadConfiguration));
     this._fileProcessor              = fileProcessor ?? throw new ArgumentNullException(nameof(fileProcessor));
     this._enrichmentService          = enrichmentService ?? throw new ArgumentNullException(nameof(enrichmentService));
     this._ordersRepository           = ordersRepository ?? throw new ArgumentNullException(nameof(ordersRepository));
     this._fileUploadOrdersRepository = fileUploadOrdersRepository
                                        ?? throw new ArgumentNullException(nameof(fileUploadOrdersRepository));
     this._fileUploadMessageSender = fileUploadMessageSender
                                     ?? throw new ArgumentNullException(nameof(fileUploadMessageSender));
     this._systemProcessContext =
         systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));
     this._omsVersioner = omsVersioner ?? throw new ArgumentNullException(nameof(omsVersioner));
     this._logger       = logger ?? throw new ArgumentNullException(nameof(logger));
 }
        public void Setup()
        {
            this._uploadConfiguration  = A.Fake <IUploadConfiguration>();
            this._systemProcessContext = A.Fake <ISystemProcessContext>();
            this._reddeerDirectory     = A.Fake <IReddeerDirectory>();

            this._fileProcessor                  = A.Fake <IAllocationFileProcessor>();
            this._allocationRepository           = A.Fake <IOrderAllocationRepository>();
            this._fileUploadAllocationRepository = A.Fake <IFileUploadOrderAllocationRepository>();
            this._coordinatorMessageSender       = A.Fake <IUploadCoordinatorMessageSender>();
            this._logger = A.Fake <ILogger <AllocationFileMonitor> >();
        }
        public void Setup()
        {
            this._uploadConfiguration        = A.Fake <IUploadConfiguration>();
            this._directory                  = A.Fake <IReddeerDirectory>();
            this._fileProcessor              = A.Fake <IUploadTradeFileProcessor>();
            this._enrichmentService          = A.Fake <IEnrichmentService>();
            this._ordersRepository           = A.Fake <IOrdersRepository>();
            this._fileUploadOrdersRepository = A.Fake <IFileUploadOrdersRepository>();
            this._systemProcessContext       = A.Fake <ISystemProcessContext>();
            this._messageSender              = A.Fake <IUploadCoordinatorMessageSender>();
            this._omsVersioner               = A.Fake <IOmsVersioner>();
            this._logger = A.Fake <ILogger <UploadTradeFileMonitor> >();

            A.CallTo(() => this._omsVersioner.ProjectOmsVersion(A <IReadOnlyCollection <Order> > .Ignored))
            .ReturnsLazily(a => (IReadOnlyCollection <Order>)a.Arguments[0]);
        }
 public AllocationFileMonitor(
     IAllocationFileProcessor fileProcessor,
     ISystemProcessContext systemProcessContext,
     IUploadConfiguration uploadConfiguration,
     IReddeerDirectory directory,
     IOrderAllocationRepository repository,
     IFileUploadOrderAllocationRepository fileUploadRepository,
     IUploadCoordinatorMessageSender messageSender,
     ILogger <AllocationFileMonitor> logger)
     : base(directory, logger, "Allocation File Monitor")
 {
     this._allocationFileProcessor = fileProcessor ?? throw new ArgumentNullException(nameof(fileProcessor));
     this._systemProcessContext    =
         systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));
     this._uploadConfiguration =
         uploadConfiguration ?? throw new ArgumentNullException(nameof(uploadConfiguration));
     this._allocationRepository = repository ?? throw new ArgumentNullException(nameof(repository));
     this._fileUploadRepository =
         fileUploadRepository ?? throw new ArgumentNullException(nameof(fileUploadRepository));
     this._messageSender = messageSender ?? throw new ArgumentNullException(nameof(messageSender));
 }