public NotificationImportService(INotificationMapper notificationMapper, INotificationRepository notificationRepository, INotificationImportRepository notificationImportRepository, IImportLogger logger, IHub sentryHub, IMigratedNotificationsMarker migratedNotificationsMarker, ISpecimenImportService specimenImportService, IImportValidator importValidator, IClusterImportService clusterImportService, ICultureAndResistanceService cultureAndResistanceService, IDrugResistanceProfileService drugResistanceProfileService, ICaseManagerImportService caseManagerImportService) { sentryHub.ConfigureScope(s => { s.SetTag("context", "migration"); }); _notificationMapper = notificationMapper; _notificationRepository = notificationRepository; _notificationImportRepository = notificationImportRepository; _logger = logger; _migratedNotificationsMarker = migratedNotificationsMarker; _specimenImportService = specimenImportService; _importValidator = importValidator; _clusterImportService = clusterImportService; _cultureAndResistanceService = cultureAndResistanceService; _drugResistanceProfileService = drugResistanceProfileService; _caseManagerImportService = caseManagerImportService; }
public TreatmentEventMapperTest() { _context = SetupTestContext(); _referenceDataRepository = new ReferenceDataRepository(_context); _adOptionMock.Setup(s => s.CurrentValue).Returns(new AdOptions { ReadOnlyUserGroup = "TestReadOnly" }); var userRepo = new UserRepository(_context, _adOptionMock.Object); var migrationRepo = new Mock <IMigrationRepository>(); migrationRepo.Setup(mr => mr.GetLegacyUserByUsername(It.IsAny <string>())) .Returns((string username) => Task.FromResult(_usernameToLegacyUserDict[username])); migrationRepo.Setup(repo => repo.GetLegacyUserHospitalsByUsername(It.IsAny <string>())) .ReturnsAsync((string username) => new List <MigrationLegacyUserHospital>()); var importLogger = new Mock <IImportLogger>(); _caseManagerImportService = new CaseManagerImportService(userRepo, _referenceDataRepository, migrationRepo.Object, importLogger.Object); _treatmentEventMapper = new TreatmentEventMapper(_caseManagerImportService, _referenceDataRepository); }
public TreatmentEventMapper(ICaseManagerImportService caseManagerImportService, IReferenceDataRepository referenceDataRepository) { _caseManagerImportService = caseManagerImportService; _referenceDataRepository = referenceDataRepository; }