/// <summary> /// Initializes a new instance of the <see cref="DataCoordinatorScheduler"/> class. /// </summary> /// <param name="dataVerifier"> /// The data verifier. /// </param> /// <param name="autoScheduler"> /// The auto scheduler. /// </param> /// <param name="logger"> /// The logger. /// </param> public DataCoordinatorScheduler( IDataVerifier dataVerifier, IAutoSchedule autoScheduler, ILogger <DataCoordinatorScheduler> logger) { this.dataVerifier = dataVerifier ?? throw new ArgumentNullException(nameof(dataVerifier)); this.autoScheduler = autoScheduler ?? throw new ArgumentNullException(nameof(autoScheduler)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
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); }
/// <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)); }