コード例 #1
0
 public MessageService(IMessageRepository messageRepo, IUserService userService, IMessageTemplateService messageTemplateService,
                       IColidEntrySubscriptionService colidEntrySubscriptionService, IActiveDirectoryService activeDirectoryService, IMapper mapper, ILogger <MessageService> logger) : base(messageRepo)
 {
     _messageRepo                   = messageRepo;
     _userService                   = userService;
     _messageTemplateService        = messageTemplateService;
     _colidEntrySubscriptionService = colidEntrySubscriptionService;
     _activeDirectoryService        = activeDirectoryService;
     _mapper = mapper;
     _logger = logger;
 }
コード例 #2
0
 public MessageService(IGenericRepository repo, IUserService userService, IMessageTemplateService messageTemplateService,
                       IColidEntrySubscriptionService colidEntrySubscriptionService, IActiveDirectoryService activeDirectoryService, IMapper mapper, ILogger <MessageService> logger,
                       IConfiguration configuration) : base(repo)
 {
     _userService                   = userService;
     _messageTemplateService        = messageTemplateService;
     _colidEntrySubscriptionService = colidEntrySubscriptionService;
     _activeDirectoryService        = activeDirectoryService;
     _mapper        = mapper;
     _logger        = logger;
     _configuration = configuration;
 }
コード例 #3
0
 public UserService(IGenericRepository repo,
                    IConsumerGroupService consumerGroupService,
                    IRemoteSearchService remoteSearchService,
                    IColidEntrySubscriptionService colidEntrySubscriptionService,
                    IMessageTemplateService messageTemplateService,
                    IMapper mapper, ILogger <UserService> logger) : base(repo)
 {
     _consumerGroupService          = consumerGroupService;
     _colidEntrySubscriptionService = colidEntrySubscriptionService;
     _messageTemplateService        = messageTemplateService;
     _mapper = mapper;
     _logger = logger;
     _remoteSearchService = remoteSearchService;
 }
コード例 #4
0
 public UserService(IUserRepository userRepo,
                    IConsumerGroupService consumerGroupService,
                    IGenericService <SearchFilterDataMarketplace, int> searchFilterDataMarketplaceService,
                    IColidEntrySubscriptionService colidEntrySubscriptionService,
                    IGenericService <StoredQuery, int> storedQueryService,
                    IMapper mapper, ILogger <UserService> logger) : base(userRepo)
 {
     _userRepo             = userRepo;
     _consumerGroupService = consumerGroupService;
     _searchFilterDataMarketplaceService = searchFilterDataMarketplaceService;
     _colidEntrySubscriptionService      = colidEntrySubscriptionService;
     _storedQueryService = storedQueryService;
     _mapper             = mapper;
     _logger             = logger;
 }
        public ColidEntrySubscriptionServiceTests()
        {
            _mockSubscriptionRepository = new Mock <IColidEntrySubscriptionRepository>();
            _mockLogger          = new Mock <ILogger <ColidEntrySubscriptionService> >();
            _subscriptionService = new ColidEntrySubscriptionService(_mockSubscriptionRepository.Object, _mockLogger.Object);

            // Init testdata
            _userId = Guid.NewGuid();
            var builder = new ColidEntrySubscriptionBuilder().WithColidEntry(new Uri($"https://pid.bayer.com/kos19050#{Guid.NewGuid()}"));

            _colidEntrySubscription    = builder.Build();
            _colidEntrySubscriptionDto = builder.BuildDto();

            // Init mock behaviour
            _mockSubscriptionRepository.Setup(x => x.GetOne(It.IsAny <Guid>(), It.IsAny <Uri>()))
            .Returns(_colidEntrySubscription);

            IList <User> subscribedUsers;

            _mockSubscriptionRepository.Setup(x => x.TryGetAllUsers(It.IsAny <Uri>(), out subscribedUsers));
        }
コード例 #6
0
 public ColidEntriesController(IMessageService messageService, IColidEntrySubscriptionService colidEntrySubscriptionService, ILogger <ColidEntriesController> logger)
 {
     _messageService = messageService;
     _colidEntrySubscriptionService = colidEntrySubscriptionService;
     _logger = logger;
 }