private static SummarisationProcess NewService( IFcsRepository fcsRepository = null, IEnumerable <ISummarisationConfigProvider <CollectionPeriod> > collectionPeriodsProviders = null, IEnumerable <ISummarisationConfigProvider <FundingType> > fundingTypesProviders = null, Func <IInputDataRepository <LearningProvider> > repositoryFactory = null, ISummarisationDataOptions dataOptions = null, ILogger logger = null, IProviderSummarisationService <LearningProvider> providerSummarisationService = null, IFundingDataRemovedService fundingDataRemovedService = null) { return(new SummarisationProcess( fcsRepository ?? Mock.Of <IFcsRepository>(), collectionPeriodsProviders ?? Mock.Of <IEnumerable <ISummarisationConfigProvider <CollectionPeriod> > >(), fundingTypesProviders ?? Mock.Of <IEnumerable <ISummarisationConfigProvider <FundingType> > >(), repositoryFactory ?? Mock.Of <Func <IInputDataRepository <LearningProvider> > >(), dataOptions ?? Mock.Of <ISummarisationDataOptions>(), logger ?? Mock.Of <ILogger>(), providerSummarisationService ?? Mock.Of <IProviderSummarisationService <LearningProvider> >(), fundingDataRemovedService ?? Mock.Of <IFundingDataRemovedService>())); }
public SummarisationProcess( IFcsRepository fcsRepository, IEnumerable <ISummarisationConfigProvider <CollectionPeriod> > collectionPeriodsProviders, IEnumerable <ISummarisationConfigProvider <FundingType> > fundingTypesProviders, Func <IInputDataRepository <LearningProvider> > repositoryFactory, ISummarisationDataOptions dataOptions, ILogger logger, IProviderSummarisationService <LearningProvider> providerSummarisationService, IFundingDataRemovedService fundingDataRemovedService) { _fcsRepository = fcsRepository; _collectionPeriodsProviders = collectionPeriodsProviders; _fundingTypesProviders = fundingTypesProviders; _logger = logger; _repositoryFactory = repositoryFactory; _providerSummarisationService = providerSummarisationService; _fundingDataRemovedService = fundingDataRemovedService; _dataRetrievalMaxConcurrentCalls = 4; int.TryParse(dataOptions.DataRetrievalMaxConcurrentCalls, out _dataRetrievalMaxConcurrentCalls); }