public NotificationImportServiceTest()
        {
            _notificationImportService = new NotificationImportService(
                _notificationMapper.Object,
                _notificationRepository.Object,
                _notificationImportRepository.Object,
                _logger.Object,
                _sentryHub.Object,
                _migratedNotificationsMarker.Object,
                _specimenImportService.Object,
                _importValidator.Object,
                _clusterImportService.Object,
                _cultureAndResistanceService.Object,
                _drugResistanceProfileService.Object,
                _caseManagerImportService.Object);

            _importValidator
            .Setup(iv => iv.CleanAndValidateNotification(_performContext, _runId, It.IsAny <Notification>()))
            .Returns(Task.FromResult(new List <ValidationResult>()));

            _notificationImportRepository
            .Setup(nir => nir.AddLinkedNotificationsAsync(It.IsAny <List <Notification> >()))
            .Returns((List <Notification> notificationList) => Task.FromResult(notificationList));

            _notificationRepository.Setup(nr => nr.NotificationWithLegacyIdExistsAsync(It.IsAny <string>()))
            .Returns(Task.FromResult(false));
        }
Пример #2
0
 public Index(ILegacySearchService legacySearchService,
              INotificationImportService notificationImportService,
              INotificationRepository notificationRepository)
 {
     _legacySearchService       = legacySearchService;
     _notificationImportService = notificationImportService;
     _notificationRepository    = notificationRepository;
 }
Пример #3
0
 public Index(ILegacySearchService legacySearchService,
              INotificationImportService notificationImportService,
              INotificationImportRepository notificationImportRepository,
              INotificationRepository notificationRepository,
              IUserHelper userHelper,
              IAuthorizationService authorizationService)
 {
     _legacySearchService          = legacySearchService;
     _notificationImportService    = notificationImportService;
     _notificationImportRepository = notificationImportRepository;
     _notificationRepository       = notificationRepository;
     _userHelper           = userHelper;
     _authorizationService = authorizationService;
 }