public DataLockUpdater(ILog logger,
                               IPaymentEvents paymentEventsService,
                               IDataLockRepository dataLockRepository,
                               IApprenticeshipUpdateRepository apprenticeshipUpdateRepository,
                               CommitmentPaymentsConfiguration config,
                               IFilterOutAcademicYearRollOverDataLocks filter,
                               IApprenticeshipRepository apprenticeshipRepository)
        {
            _logger = logger;
            _paymentEventsSerivce           = paymentEventsService;
            _dataLockRepository             = dataLockRepository;
            _apprenticeshipUpdateRepository = apprenticeshipUpdateRepository;
            _config = config;
            _filterAcademicYearRolloverDataLocks = filter;
            _apprenticeshipRepository            = apprenticeshipRepository;

            _whiteList = new List <DataLockErrorCode>
            {
                DataLockErrorCode.Dlock03,
                DataLockErrorCode.Dlock04,
                DataLockErrorCode.Dlock05,
                DataLockErrorCode.Dlock06,
                DataLockErrorCode.Dlock07
            };
        }
        public DataLockUpdater(ILog logger,
                               IPaymentEvents paymentEventsService,
                               IDataLockRepository dataLockRepository,
                               IApprenticeshipUpdateRepository apprenticeshipUpdateRepository,
                               CommitmentPaymentsConfiguration config,
                               IFilterOutAcademicYearRollOverDataLocks filter,
                               IApprenticeshipRepository apprenticeshipRepository)
        {
            if (logger == null)
            {
                throw new ArgumentNullException(nameof(ILog));
            }
            if (paymentEventsService == null)
            {
                throw new ArgumentNullException(nameof(IPaymentEvents));
            }
            if (dataLockRepository == null)
            {
                throw new ArgumentNullException(nameof(IDataLockRepository));
            }
            if (apprenticeshipUpdateRepository == null)
            {
                throw new ArgumentNullException(nameof(IApprenticeshipUpdateRepository));
            }
            if (config == null)
            {
                throw new ArgumentNullException(nameof(CommitmentPaymentsConfiguration));
            }
            if (filter == null)
            {
                throw new ArgumentNullException(nameof(IFilterOutAcademicYearRollOverDataLocks));
            }

            _logger = logger;
            _paymentEventsSerivce           = paymentEventsService;
            _dataLockRepository             = dataLockRepository;
            _apprenticeshipUpdateRepository = apprenticeshipUpdateRepository;
            _config = config;
            _filterAcademicYearRolloverDataLocks = filter;
            _apprenticeshipRepository            = apprenticeshipRepository;

            _whiteList = new List <DataLockErrorCode>
            {
                DataLockErrorCode.Dlock03,
                DataLockErrorCode.Dlock04,
                DataLockErrorCode.Dlock05,
                DataLockErrorCode.Dlock06,
                DataLockErrorCode.Dlock07
            };
        }
        public AddEpaToApprenticeships(ILog logger,
                                       IAssessmentOrgs assessmentOrgsService,
                                       IPaymentEvents paymentEventsService,
                                       IAssessmentOrganisationRepository assessmentOrganisationRepository,
                                       IApprenticeshipRepository apprenticeshipRepository,
                                       IJobProgressRepository jobProgressRepository)
        {
            _logger = logger ?? throw new ArgumentNullException(nameof(ILog));
            _assessmentOrgsService            = assessmentOrgsService ?? throw new ArgumentNullException(nameof(assessmentOrgsService));
            _paymentEventsService             = paymentEventsService ?? throw new ArgumentNullException(nameof(IPaymentEvents));
            _assessmentOrganisationRepository = assessmentOrganisationRepository ?? throw new ArgumentNullException(nameof(assessmentOrganisationRepository));
            _apprenticeshipRepository         = apprenticeshipRepository ?? throw new ArgumentNullException(nameof(apprenticeshipRepository));
            _jobProgressRepository            = jobProgressRepository ?? throw new ArgumentNullException(nameof(jobProgressRepository));

            _logger.Info($"Using {_paymentEventsService.GetType().Name} for payment events service");
            _logger.Info($"Using {_assessmentOrganisationRepository.GetType().Name} for assessment organisation service");
        }