Пример #1
0
 public ResourceAuthHandler(IHttpContextAccessor httpContextAccessor, IUserInfoService userInfoService, IConsumerGroupService consumerGroupService, IResourceService resourceService, IMapper mapper) : base(userInfoService)
 {
     _httpContextAccessor  = httpContextAccessor;
     _consumerGroupService = consumerGroupService;
     _resourceService      = resourceService;
     _mapper = mapper;
 }
 public IdentifierValidator(IPidUriTemplateService pidUriTemplateService,
                            IPidUriGenerationService pidUriGenerationService,
                            IConsumerGroupService consumerGroupService)
 {
     _pidUriTemplateService   = pidUriTemplateService;
     _pidUriGenerationService = pidUriGenerationService;
     _consumerGroupService    = consumerGroupService;
 }
Пример #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 ConsumerGroupServiceTests()
        {
            _mockConsumerGroupRepository = new Mock <IConsumerGroupRepository>();
            _mockLogger = new Mock <ILogger <ConsumerGroupService> >();

            var configuration = new MapperConfiguration(cfg => cfg.AddProfile(new MappingProfiles()));
            var mapper        = new Mapper(configuration);

            _consumerGroupService = new ConsumerGroupService(_mockConsumerGroupRepository.Object, mapper, _mockLogger.Object);

            // Init testdata
            _consumerGroup = new ConsumerGroupBuilder()
                             .WithUri(new Uri("https://pid.bayer.com/kos19050#87654321-4321-4321-210987654321"))
                             .Build();

            _consumerGroupDto = new ConsumerGroupBuilder()
                                .WithUri(new Uri("https://pid.bayer.com/kos19050#12345678-1234-1234-123456789012"))
                                .BuildDto();

            // Init mock behaviour
            _mockConsumerGroupRepository.Setup(x => x.GetOne(It.IsAny <Uri>()))
            .Returns(_consumerGroup);
            _mockConsumerGroupRepository.Setup(x => x.Delete(It.IsAny <ConsumerGroup>()));
        }
 public ConsumerGroupsController(IConsumerGroupService consumerGroupService, ILogger <ConsumerGroupsController> logger)
 {
     _consumerGroupService = consumerGroupService;
     _logger = logger;
 }
Пример #7
0
 public ConsumerGroupValidator(IConsumerGroupService consumerGroupService)
 {
     _consumerGroupService = consumerGroupService;
 }
Пример #8
0
 /// <summary>
 /// API endpoint for consumer groups.
 /// </summary>
 /// <param name="consumerGroupService">The service for consumer groups</param>
 public ConsumerGroupController(IConsumerGroupService consumerGroupService)
 {
     _consumerGroupService = consumerGroupService;
 }