Example #1
0
 public ConsultationsController(
     IVideoApiClient videoApiClient,
     IConferenceCache conferenceCache,
     ILogger <ConsultationsController> logger,
     IMapperFactory mapperFactory, IConsultationNotifier consultationNotifier, IConsultationResponseTracker consultationResponseTracker)
 {
     _videoApiClient              = videoApiClient;
     _conferenceCache             = conferenceCache;
     _logger                      = logger;
     _mapperFactory               = mapperFactory;
     _consultationNotifier        = consultationNotifier;
     _consultationResponseTracker = consultationResponseTracker;
 }
Example #2
0
 public VideoEventsController(
     IVideoApiClient videoApiClient,
     IEventHandlerFactory eventHandlerFactory,
     IConferenceCache conferenceCache,
     ILogger <VideoEventsController> logger,
     IMapperFactory mapperFactory,
     IConsultationResponseTracker consultationResponseTracker)
 {
     _videoApiClient      = videoApiClient;
     _eventHandlerFactory = eventHandlerFactory;
     _conferenceCache     = conferenceCache;
     _logger        = logger;
     _mapperFactory = mapperFactory;
     _consultationResponseTracker = consultationResponseTracker;
 }
        public void Setup()
        {
            _dictionaryCache = new DictionaryConsultationResponseCache();
            _conference      = new ConferenceCacheModelBuilder().WithLinkedParticipantsInRoom().Build();

            _consultationResponseTracker = new ConsultationResponseTracker(_dictionaryCache);
            _conference = new ConferenceCacheModelBuilder().WithLinkedParticipantsInRoom().Build();
            _mocker     = AutoMock.GetLoose(builder =>
            {
                builder.RegisterInstance(_consultationResponseTracker).As <IConsultationResponseTracker>();
            });

            _mocker.Mock <IHubClients <IEventHubClient> >().Setup(x => x.Group(It.IsAny <string>()))
            .Returns(_mocker.Mock <IEventHubClient>().Object);
            _mocker.Mock <IHubContext <EventHub.Hub.EventHub, IEventHubClient> >().Setup(x => x.Clients)
            .Returns(_mocker.Mock <IHubClients <IEventHubClient> >().Object);

            _sut = _mocker.Create <ConsultationNotifier>();
        }
Example #4
0
 public ConsultationNotifier(IHubContext <EventHub.Hub.EventHub, IEventHubClient> hubContext, IConsultationResponseTracker consultationResponseTracker)
 {
     _hubContext = hubContext;
     _consultationResponseTracker = consultationResponseTracker;
 }