public SystemProcessOperationContext(
            ISystemProcessContext systemProcessContext,
            ISystemProcessOperationRepository systemProcessOperationRepository,
            ISystemProcessOperationRunRuleContextFactory runRuleContextFactory,
            ISystemProcessOperationDistributeRuleContextFactory distributeRuleContextFactory,
            ISystemProcessOperationFileUploadContextFactory uploadFileFactory,
            ISystemProcessOperationDataRequestContextFactory dataRequestFactory,
            IOperationLogging operationLogging)
        {
            this._systemProcessContext =
                systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));

            this._systemProcessOperationRepository = systemProcessOperationRepository
                                                     ?? throw new ArgumentNullException(
                                                               nameof(systemProcessOperationRepository));

            this._runRuleContextFactory =
                runRuleContextFactory ?? throw new ArgumentNullException(nameof(runRuleContextFactory));

            this._distributeRuleContextFactory = distributeRuleContextFactory
                                                 ?? throw new ArgumentNullException(
                                                           nameof(distributeRuleContextFactory));

            this._uploadFileFactory = uploadFileFactory ?? throw new ArgumentNullException(nameof(uploadFileFactory));

            this._dataRequestFactory =
                dataRequestFactory ?? throw new ArgumentNullException(nameof(dataRequestFactory));

            this._operationLogging = operationLogging ?? throw new ArgumentNullException(nameof(operationLogging));
        }
 public UploadEtlFileMonitor(
     IUploadConfiguration uploadConfiguration,
     IReddeerDirectory directory,
     IUploadEtlFileProcessor fileProcessor,
     IEnrichmentService enrichmentService,
     IOrdersRepository ordersRepository,
     IFileUploadOrdersRepository fileUploadOrdersRepository,
     IUploadCoordinatorMessageSender fileUploadMessageSender,
     ISystemProcessContext systemProcessContext,
     IOmsVersioner omsVersioner,
     ILogger <UploadEtlFileMonitor> logger)
     : base(directory, logger, "Upload Etl 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.scheduleDisassembler = A.Fake <IScheduleDisassembler>();
     this.awsClient            = A.Fake <IAwsQueueClient>();
     this.awsConfiguration     = A.Fake <IAwsConfiguration>();
     this.busSerialiser        = A.Fake <IScheduledExecutionMessageBusSerialiser>();
     this.systemProcessContext = A.Fake <ISystemProcessContext>();
     this.logger = A.Fake <ILogger <QueueDistributedRuleSubscriber> >();
 }
 public void Setup()
 {
     this._awsQueueClient   = A.Fake <IAwsQueueClient>();
     this._awsConfiguration = A.Fake <IAwsConfiguration>();
     this._logger           = A.Fake <ILogger <DataRequestSubscriber> >();
     this._sysCtx           = A.Fake <ISystemProcessContext>();
     this._serialiser       = new ThirdPartyDataRequestSerialiser();
     this._requestManager   = A.Fake <IDataRequestManager>();
 }
Exemplo n.º 5
0
        public void Setup()
        {
            this._awsQueueClient       = A.Fake <IAwsQueueClient>();
            this._awsConfiguration     = A.Fake <IAwsConfiguration>();
            this._messageBusSerialiser = A.Fake <IScheduledExecutionMessageBusSerialiser>();
            this._apiHeartbeat         = A.Fake <IApiHeartbeat>();
            this._ctx = A.Fake <ISystemProcessContext>();

            this._analysisEngine = A.Fake <IAnalysisEngine>();
            this._logger         = A.Fake <ILogger <QueueRuleSubscriber> >();
        }
Exemplo n.º 6
0
 public ISystemProcessOperationContext Build(ISystemProcessContext context)
 {
     return(new SystemProcessOperationContext(
                context,
                this._operationRepository,
                this._ruleRunFactory,
                this._distributeRuleFactory,
                this._fileUploadFactory,
                this._dataRequestFactory,
                this._operationLogging));
 }
        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.dataVerifier                  = A.Fake <IDataVerifier>();
            this.autoSchedule                  = A.Fake <IAutoSchedule>();
            this.awsQueueClient                = A.Fake <IAwsQueueClient>();
            this.awsConfiguration              = A.Fake <IAwsConfiguration>();
            this.serialiser                    = new MessageBusSerialiser();
            this.systemProcessContext          = A.Fake <ISystemProcessContext>();
            this.systemProcessOperationContext = A.Fake <ISystemProcessOperationContext>();
            this.logger = new NullLogger <QueueAutoScheduleSubscriber>();

            A.CallTo(() => this.systemProcessContext.CreateAndStartOperationContext())
            .Returns(this.systemProcessOperationContext);
        }
        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 DataRequestSubscriber(
     IAwsQueueClient awsQueueClient,
     IAwsConfiguration awsConfiguration,
     ISystemProcessContext systemProcessContext,
     IThirdPartyDataRequestSerialiser serialiser,
     IDataRequestManager dataRequestManager,
     ILogger <DataRequestSubscriber> logger)
 {
     this._awsQueueClient       = awsQueueClient ?? throw new ArgumentNullException(nameof(awsQueueClient));
     this._awsConfiguration     = awsConfiguration ?? throw new ArgumentNullException(nameof(awsConfiguration));
     this._systemProcessContext =
         systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));
     this._serialiser         = serialiser ?? throw new ArgumentNullException(nameof(serialiser));
     this._dataRequestManager =
         dataRequestManager ?? throw new ArgumentNullException(nameof(dataRequestManager));
     this._logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Exemplo n.º 11
0
 public QueueRuleCancellationSubscriber(
     IRuleCancellation ruleCancellation,
     IAwsQueueClient awsQueueClient,
     IAwsConfiguration awsConfiguration,
     ISystemProcessContext systemProcessContext,
     IMessageBusSerialiser messageBusSerialiser,
     ILogger <QueueRuleCancellationSubscriber> logger)
 {
     this._ruleCancellation     = ruleCancellation ?? throw new ArgumentNullException(nameof(ruleCancellation));
     this._awsQueueClient       = awsQueueClient ?? throw new ArgumentNullException(nameof(awsQueueClient));
     this._awsConfiguration     = awsConfiguration ?? throw new ArgumentNullException(nameof(awsConfiguration));
     this._systemProcessContext =
         systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));
     this._messageBusSerialiser =
         messageBusSerialiser ?? throw new ArgumentNullException(nameof(messageBusSerialiser));
     this._logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QueueAutoScheduleSubscriber"/> class.
 /// </summary>
 /// <param name="dataVerifier">
 /// The data verifier.
 /// </param>
 /// <param name="autoSchedule">
 /// The auto schedule.
 /// </param>
 /// <param name="awsQueueClient">
 /// The aws queue client.
 /// </param>
 /// <param name="awsConfiguration">
 /// The aws configuration.
 /// </param>
 /// <param name="serialiser">
 /// The serializer.
 /// </param>
 /// <param name="systemProcessContext">
 /// The system process context.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 public QueueAutoScheduleSubscriber(
     IDataVerifier dataVerifier,
     IAutoSchedule autoSchedule,
     IAwsQueueClient awsQueueClient,
     IAwsConfiguration awsConfiguration,
     IMessageBusSerialiser serialiser,
     ISystemProcessContext systemProcessContext,
     ILogger <QueueAutoScheduleSubscriber> logger)
 {
     this.dataVerifier         = dataVerifier ?? throw new ArgumentNullException(nameof(dataVerifier));
     this.autoSchedule         = autoSchedule ?? throw new ArgumentNullException(nameof(autoSchedule));
     this.awsQueueClient       = awsQueueClient ?? throw new ArgumentNullException(nameof(awsQueueClient));
     this.awsConfiguration     = awsConfiguration ?? throw new ArgumentNullException(nameof(awsConfiguration));
     this.serializer           = serialiser ?? throw new ArgumentNullException(nameof(serialiser));
     this.systemProcessContext = systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));
     this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="QueueDistributedRuleSubscriber"/> class.
        /// </summary>
        /// <param name="scheduleDisassembler">
        /// The schedule disassembler.
        /// </param>
        /// <param name="awsQueueClient">
        /// The aws queue client.
        /// </param>
        /// <param name="awsConfiguration">
        /// The aws configuration.
        /// </param>
        /// <param name="messageBusSerialiser">
        /// The message bus serializer.
        /// </param>
        /// <param name="systemProcessContext">
        /// The system process context.
        /// </param>
        /// <param name="logger">
        /// The logger.
        /// </param>
        public QueueDistributedRuleSubscriber(
            IScheduleDisassembler scheduleDisassembler,
            IAwsQueueClient awsQueueClient,
            IAwsConfiguration awsConfiguration,
            IScheduledExecutionMessageBusSerialiser messageBusSerialiser,
            ISystemProcessContext systemProcessContext,
            ILogger <QueueDistributedRuleSubscriber> logger)
        {
            this.scheduleDisassembler =
                scheduleDisassembler ?? throw new ArgumentNullException(nameof(scheduleDisassembler));
            this.awsQueueClient       = awsQueueClient ?? throw new ArgumentNullException(nameof(awsQueueClient));
            this.awsConfiguration     = awsConfiguration ?? throw new ArgumentNullException(nameof(awsConfiguration));
            this.messageBusSerializer =
                messageBusSerialiser ?? throw new ArgumentNullException(nameof(messageBusSerialiser));
            this.logger = logger ?? throw new ArgumentNullException(nameof(logger));

            this.systemProcessContext =
                systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));
        }
 public QueueRuleSubscriber(
     IAnalysisEngine analysisEngine,
     IAwsQueueClient awsQueueClient,
     IAwsConfiguration awsConfiguration,
     IScheduledExecutionMessageBusSerialiser messageBusSerialiser,
     IApiHeartbeat apiHeartbeat,
     ISystemProcessContext systemProcessContext,
     ILogger <QueueRuleSubscriber> logger)
 {
     this._analysisEngine       = analysisEngine ?? throw new ArgumentNullException(nameof(analysisEngine));
     this._awsQueueClient       = awsQueueClient ?? throw new ArgumentNullException(nameof(awsQueueClient));
     this._awsConfiguration     = awsConfiguration ?? throw new ArgumentNullException(nameof(awsConfiguration));
     this._messageBusSerialiser =
         messageBusSerialiser ?? throw new ArgumentNullException(nameof(messageBusSerialiser));
     this._apiHeartbeat         = apiHeartbeat ?? throw new ArgumentNullException(nameof(apiHeartbeat));
     this._systemProcessContext =
         systemProcessContext ?? throw new ArgumentNullException(nameof(systemProcessContext));
     this._logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
 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));
 }
        public void Setup()
        {
            this._enrichmentService          = A.Fake <IEnrichmentService>();
            this._ordersRepository           = A.Fake <IOrdersRepository>();
            this._fileUploadOrdersRepository = A.Fake <IFileUploadOrdersRepository>();
            this._systemProcessContext       = A.Fake <ISystemProcessContext>();
            this._uploadMessageSender        = A.Fake <IUploadCoordinatorMessageSender>();

            this._uploadTradeFileMonitor = new UploadTradeFileMonitor(
                new Configuration.Configuration(),
                new ReddeerDirectory(),
                new UploadTradeFileProcessor(
                    new OrderFileToOrderSerialiser(),
                    new OrderFileValidator(),
                    new NullLogger <UploadTradeFileProcessor>()),
                this._enrichmentService,
                this._ordersRepository,
                this._fileUploadOrdersRepository,
                this._uploadMessageSender,
                this._systemProcessContext,
                new OmsVersioner(new OmsOrderFieldCompression()),
                new NullLogger <UploadTradeFileMonitor>());
        }
Exemplo n.º 17
0
 public ApplicationHeartbeatService(ISystemProcessContext context)
 {
     this._context = context ?? throw new ArgumentNullException(nameof(context));
 }