public ReleaseService( ContentDbContext context, IMapper mapper, IPersistenceHelper <ContentDbContext> persistenceHelper, IUserService userService, IReleaseRepository repository, IReleaseFileRepository releaseFileRepository, ISubjectRepository subjectRepository, IReleaseDataFileService releaseDataFileService, IReleaseFileService releaseFileService, IDataImportService dataImportService, IFootnoteService footnoteService, StatisticsDbContext statisticsDbContext, IDataBlockService dataBlockService, IReleaseSubjectRepository releaseSubjectRepository, IGuidGenerator guidGenerator, IBlobCacheService cacheService) { _context = context; _mapper = mapper; _persistenceHelper = persistenceHelper; _userService = userService; _repository = repository; _releaseFileRepository = releaseFileRepository; _subjectRepository = subjectRepository; _releaseDataFileService = releaseDataFileService; _releaseFileService = releaseFileService; _dataImportService = dataImportService; _footnoteService = footnoteService; _statisticsDbContext = statisticsDbContext; _dataBlockService = dataBlockService; _releaseSubjectRepository = releaseSubjectRepository; _guidGenerator = guidGenerator; _cacheService = cacheService; }
private ReleaseService BuildReleaseService( ContentDbContext contentDbContext, StatisticsDbContext statisticsDbContext, IPublishingService publishingService = null, IPersistenceHelper <ContentDbContext> persistenceHelper = null, IUserService userService = null, IReleaseRepository repository = null, ISubjectService subjectService = null, ITableStorageService coreTableStorageService = null, IReleaseDataFileService releaseDataFileService = null, IReleaseFileService releaseFileService = null, IImportStatusService importStatusService = null, IFootnoteService footnoteService = null, IDataBlockService dataBlockService = null, IReleaseSubjectService releaseSubjectService = null, IReleaseChecklistService releaseChecklistService = null, IGuidGenerator guidGenerator = null) { return(new ReleaseService( contentDbContext, AdminMapper(), publishingService ?? new Mock <IPublishingService>().Object, persistenceHelper ?? new PersistenceHelper <ContentDbContext>(contentDbContext), userService ?? UserServiceMock().Object, repository ?? new Mock <IReleaseRepository>().Object, subjectService ?? new Mock <ISubjectService>().Object, coreTableStorageService ?? new Mock <ITableStorageService>().Object, releaseDataFileService ?? new Mock <IReleaseDataFileService>().Object, releaseFileService ?? new Mock <IReleaseFileService>().Object, importStatusService ?? new Mock <IImportStatusService>().Object, footnoteService ?? new Mock <IFootnoteService>().Object, statisticsDbContext ?? statisticsDbContext, dataBlockService ?? new Mock <IDataBlockService>().Object, releaseChecklistService ?? new Mock <IReleaseChecklistService>().Object, releaseSubjectService ?? new Mock <IReleaseSubjectService>().Object, guidGenerator ?? new SequentialGuidGenerator() )); }
// TODO EES-212 - ReleaseService needs breaking into smaller services as it feels like it is now doing too // much work and has too many dependencies public ReleaseService( ContentDbContext context, IMapper mapper, IPublishingService publishingService, IPersistenceHelper <ContentDbContext> persistenceHelper, IUserService userService, IReleaseRepository repository, ISubjectService subjectService, ITableStorageService coreTableStorageService, IReleaseDataFileService releaseDataFileService, IReleaseFileService releaseFileService, IImportStatusService importStatusService, IFootnoteService footnoteService, StatisticsDbContext statisticsDbContext, IDataBlockService dataBlockService, IReleaseChecklistService releaseChecklistService, IReleaseSubjectService releaseSubjectService, IGuidGenerator guidGenerator) { _context = context; _publishingService = publishingService; _mapper = mapper; _persistenceHelper = persistenceHelper; _userService = userService; _repository = repository; _subjectService = subjectService; _coreTableStorageService = coreTableStorageService; _releaseDataFileService = releaseDataFileService; _releaseFileService = releaseFileService; _importStatusService = importStatusService; _footnoteService = footnoteService; _statisticsDbContext = statisticsDbContext; _dataBlockService = dataBlockService; _releaseChecklistService = releaseChecklistService; _releaseSubjectService = releaseSubjectService; _guidGenerator = guidGenerator; }