public SpecificationPublishingService(
            ISpecificationIdServiceRequestValidator specificationIdValidator,
            IPublishedProviderIdsServiceRequestValidator publishedProviderIdsValidator,
            IProviderService providerService,
            ISpecificationsApiClient specifications,
            IPublishingResiliencePolicies resiliencePolicies,
            ICacheProvider cacheProvider,
            ICreateRefreshFundingJobs refreshFundingJobs,
            ICreateApproveAllFundingJobs approveSpecificationFundingJobs,
            ICreateApproveBatchFundingJobs approveProviderFundingJobs,
            ISpecificationFundingStatusService specificationFundingStatusService,
            IFundingConfigurationService fundingConfigurationService,
            IPrerequisiteCheckerLocator prerequisiteCheckerLocator,
            IPublishedFundingRepository publishedFundingRepository)
            : base(specificationIdValidator, publishedProviderIdsValidator, specifications, resiliencePolicies, fundingConfigurationService)
        {
            Guard.ArgumentNotNull(refreshFundingJobs, nameof(refreshFundingJobs));
            Guard.ArgumentNotNull(approveSpecificationFundingJobs, nameof(approveSpecificationFundingJobs));
            Guard.ArgumentNotNull(approveProviderFundingJobs, nameof(approveProviderFundingJobs));
            Guard.ArgumentNotNull(cacheProvider, nameof(cacheProvider));
            Guard.ArgumentNotNull(specificationFundingStatusService, nameof(specificationFundingStatusService));
            Guard.ArgumentNotNull(prerequisiteCheckerLocator, nameof(prerequisiteCheckerLocator));
            Guard.ArgumentNotNull(providerService, nameof(providerService));
            Guard.ArgumentNotNull(publishedFundingRepository, nameof(publishedFundingRepository));
            Guard.ArgumentNotNull(resiliencePolicies?.PublishedFundingRepository, "resiliencePolicies.PublishedFundingRepository");

            _refreshFundingJobs = refreshFundingJobs;
            _cacheProvider      = cacheProvider;
            _approveSpecificationFundingJobs   = approveSpecificationFundingJobs;
            _approveProviderFundingJobs        = approveProviderFundingJobs;
            _specificationFundingStatusService = specificationFundingStatusService;
            _prerequisiteCheckerLocator        = prerequisiteCheckerLocator;
            _publishedFundingRepository        = publishedFundingRepository;
            _providerService = providerService;
        }
Beispiel #2
0
        public void SetUp()
        {
            _approveSpecificationFundingJobs = Substitute.For <ICreateApproveAllFundingJobs>();
            _approveProviderFundingJobs      = Substitute.For <ICreateApproveBatchFundingJobs>();
            _cacheProvider = Substitute.For <ICacheProvider>();
            _specificationFundingStatusService = Substitute.For <ISpecificationFundingStatusService>();
            _prerequisiteCheckerLocator        = Substitute.For <IPrerequisiteCheckerLocator>();
            _prerequisiteChecker = Substitute.For <IPrerequisiteChecker>();
            _providerService     = Substitute.For <IProviderService>();
            _publishedFunding    = Substitute.For <IPublishedFundingRepository>();

            _service = new SpecificationPublishingService(
                SpecificationIdValidator,
                ProviderIdsValidator,
                _providerService,
                Specifications,
                ResiliencePolicies,
                _cacheProvider,
                Jobs,
                _approveSpecificationFundingJobs,
                _approveProviderFundingJobs,
                _specificationFundingStatusService,
                FundingConfigurationService,
                _prerequisiteCheckerLocator,
                _publishedFunding);

            _approveProvidersRequest = BuildApproveProvidersRequest(_ => _.WithProviders(ProviderIds));
        }