public WebexTeamsMessageHandler(IWebexTeamsApiService apiService, IWebexTeamsMessageParser messageParser,
                                 IWebexTeamsMapper mapper)
 {
     _apiService    = apiService;
     _messageParser = messageParser;
     _mapper        = mapper;
 }
Пример #2
0
 public WebexTeamsWebhookHandler(IWebexTeamsApiService apiService,
                                 IOptions <WebexTeamsSettings> settings, IWebexTeamsMapper mapper,
                                 IWebexTeamsMessageParser messageParser)
 {
     _apiService    = apiService;
     _settings      = settings.Value;
     _mapper        = mapper;
     _messageParser = messageParser;
 }
        public WebexTeamsPersonHandlerTest()
        {
            _apiService = Substitute.For <IWebexTeamsApiService>();
            var mapper = new MapperConfiguration(c =>
            {
                c.AddProfile <CommonMappers>();
                c.AddProfile <PersonMapper>();
            }).CreateMapper();

            _subject = new WebexTeamsPersonHandler(_apiService, new WebexTeamsMapper(mapper));
        }
Пример #4
0
        public WebexTeamsWebhookHandlerTest()
        {
            _apiService    = Substitute.For <IWebexTeamsApiService>();
            _settings      = new WebexTeamsSettings();
            _messageParser = Substitute.For <IWebexTeamsMessageParser>();
            var options = Substitute.For <IOptions <WebexTeamsSettings> >();

            options.Value.Returns(_settings);
            var mapper = new MapperConfiguration(c =>
            {
                c.AddProfile <CommonMappers>();
                c.AddProfile <WebhookMapper>();
                c.AddProfile <PersonMapper>();
            }).CreateMapper();

            _subject = new WebexTeamsWebhookHandler(_apiService, options, new WebexTeamsMapper(mapper), _messageParser);
        }
 public WebexTeamsRoomHandler(IWebexTeamsApiService apiService, IWebexTeamsMapper mapper)
 {
     _apiService = apiService;
     _mapper     = mapper;
 }