コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DataVerifier"/> class.
 /// </summary>
 /// <param name="ordersRepository">
 /// The orders repository.
 /// </param>
 /// <param name="orderAllocationsRepository">
 /// The order allocations repository.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 public DataVerifier(
     IOrdersRepository ordersRepository,
     IOrderAllocationRepository orderAllocationsRepository,
     ILogger <DataVerifier> logger)
 {
     this.ordersRepository           = ordersRepository ?? throw new ArgumentNullException(nameof(ordersRepository));
     this.orderAllocationsRepository =
         orderAllocationsRepository ?? throw new ArgumentNullException(nameof(orderAllocationsRepository));
     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> >();
        }
コード例 #3
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));
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrdersToAllocatedOrdersProjector"/> class.
 /// </summary>
 /// <param name="orderAllocationRepository">
 /// The order allocation repository.
 /// </param>
 public OrdersToAllocatedOrdersProjector(IOrderAllocationRepository orderAllocationRepository)
 {
     this.orderAllocationRepository =
         orderAllocationRepository ?? throw new ArgumentNullException(nameof(orderAllocationRepository));
 }
 public void Setup()
 {
     this._repository = A.Fake <IOrderAllocationRepository>();
 }