private SummarisationWrapper NewSummarisationWrapper(
            IFcsRepository fcsRepository = null,
            ISummarisedActualsProcessRepository summarisedActualsProcessRepository                    = null,
            IEnumerable <ISummarisationConfigProvider <FundingType> > fundingTypesProviders           = null,
            IEnumerable <ISummarisationConfigProvider <CollectionPeriod> > collectionPeriodsProviders = null,
            IEnumerable <ISummarisationService> summarisationServices = null,
            IDataStorePersistenceService dataStorePersistenceService  = null,
            Func <IProviderRepository> repositoryFactory = null,
            ISummarisationDataOptions dataOptions        = null,
            ILogger logger = null,
            ISummarisationMessage summarisationMessage = null)
        {
            if (dataOptions == null)
            {
                dataOptions = new SummarisationDataOptions()
                {
                    DataRetrievalMaxConcurrentCalls = "4"
                };
            }

            return(new SummarisationWrapper(
                       fcsRepository: fcsRepository,
                       summarisedActualsProcessRepository: summarisedActualsProcessRepository,
                       fundingTypesProviders: fundingTypesProviders,
                       collectionPeriodsProviders: collectionPeriodsProviders,
                       summarisationServices: summarisationServices,
                       dataStorePersistenceService: dataStorePersistenceService,
                       repositoryFactory: repositoryFactory,
                       dataOptions: dataOptions,
                       logger: logger));
        }
Exemple #2
0
 public SummarisationProcess(
     IGenericCollectionRepository genericCollectionRepository,
     IProviderSummarisationService <IEnumerable <SummarisedActual> > providerSummarisationService,
     ISummarisationDataOptions dataOptions,
     IFcsRepository fcsRepository,
     ILogger logger)
 {
     _logger = logger;
     _genericCollectionRepository  = genericCollectionRepository;
     _providerSummarisationService = providerSummarisationService;
     _fcsRepository = fcsRepository;
     _dataRetrievalMaxConcurrentCalls = 4;
     int.TryParse(dataOptions.DataRetrievalMaxConcurrentCalls, out _dataRetrievalMaxConcurrentCalls);
 }
Exemple #3
0
 private static SummarisationProcess NewService(
     IGenericCollectionRepository genericCollectionRepository = null,
     IProviderSummarisationService <IEnumerable <SummarisedActual> > providerSummarisationService = null,
     ISummarisationDataOptions dataOptions = null,
     IFcsRepository fcsRepository          = null,
     ILogger logger = null)
 {
     return(new SummarisationProcess(
                genericCollectionRepository ?? Mock.Of <IGenericCollectionRepository>(),
                providerSummarisationService ?? Mock.Of <IProviderSummarisationService <IEnumerable <SummarisedActual> > >(),
                dataOptions ?? Mock.Of <ISummarisationDataOptions>(),
                fcsRepository ?? Mock.Of <IFcsRepository>(),
                logger ?? Mock.Of <ILogger>()));
 }
Exemple #4
0
 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)
 {
     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> >()));
 }
Exemple #5
0
        public SummarisationProcess(
            IFcsRepository fcsRepository,
            IEnumerable <ISummarisationConfigProvider <CollectionPeriod> > collectionPeriodsProviders,
            IEnumerable <ISummarisationConfigProvider <FundingType> > fundingTypesProviders,
            Func <IInputDataRepository <LearningProvider> > repositoryFactory,
            ISummarisationDataOptions dataOptions,
            ILogger logger,
            IProviderSummarisationService <LearningProvider> providerSummarisationService)
        {
            _fcsRepository = fcsRepository;
            _collectionPeriodsProviders = collectionPeriodsProviders;
            _fundingTypesProviders      = fundingTypesProviders;
            _logger                       = logger;
            _repositoryFactory            = repositoryFactory;
            _providerSummarisationService = providerSummarisationService;

            _dataRetrievalMaxConcurrentCalls = 4;
            int.TryParse(dataOptions.DataRetrievalMaxConcurrentCalls, out _dataRetrievalMaxConcurrentCalls);
        }