Beispiel #1
0
        public void Setup()
        {
            _memoryCache          = new MemoryCache(new MemoryCacheOptions());
            _conferenceCache      = new ConferenceCache(_memoryCache);
            _eventComponentHelper = new EventComponentHelper();
            _videoApiClientMock   = new Mock <IVideoApiClient>();
            var claimsPrincipal = new ClaimsPrincipalBuilder().Build();

            _testConference = _eventComponentHelper.BuildConferenceForTest();
            _mockLogger     = new Mock <ILogger <ParticipantsController> >();

            var context = new ControllerContext
            {
                HttpContext = new DefaultHttpContext
                {
                    User = claimsPrincipal
                }
            };

            var eventHandlerFactory = new EventHandlerFactory(_eventComponentHelper.GetHandlers());

            _controller = new ParticipantsController(_videoApiClientMock.Object, eventHandlerFactory, _conferenceCache,
                                                     _mockLogger.Object)
            {
                ControllerContext = context
            };
            _eventComponentHelper.Cache.Set(_testConference.Id, _testConference);
            _eventComponentHelper.RegisterUsersForHubContext(_testConference.Participants);
        }
Beispiel #2
0
 public ConferenceManagementController(IVideoApiClient videoApiClient,
                                       ILogger <ConferenceManagementController> logger, IConferenceCache conferenceCache)
 {
     _videoApiClient  = videoApiClient;
     _logger          = logger;
     _conferenceCache = conferenceCache;
 }
Beispiel #3
0
        public void Setup()
        {
            _mocker               = AutoMock.GetLoose();
            _memoryCache          = new MemoryCache(new MemoryCacheOptions());
            _conferenceCache      = new ConferenceCache(_memoryCache);
            _eventComponentHelper = new EventComponentHelper();
            var claimsPrincipal = new ClaimsPrincipalBuilder().Build();

            _testConference = _eventComponentHelper.BuildConferenceForTest();

            var context = new ControllerContext
            {
                HttpContext = new DefaultHttpContext
                {
                    User = claimsPrincipal
                }
            };

            var eventHandlerFactory = new EventHandlerFactory(_eventComponentHelper.GetHandlers());

            _sut = _mocker.Create <ParticipantsController>(new TypedParameter(typeof(IEventHandlerFactory), eventHandlerFactory), new TypedParameter(typeof(IConferenceCache), _conferenceCache));
            _sut.ControllerContext = context;

            _eventComponentHelper.Cache.Set(_testConference.Id, _testConference);
            _eventComponentHelper.RegisterUsersForHubContext(_testConference.Participants);
        }
 protected EventHandlerBase(IHubContext <Hub.EventHub, IEventHubClient> hubContext,
                            IConferenceCache conferenceCache, ILogger <EventHandlerBase> logger, IVideoApiClient videoApiClient)
 {
     HubContext       = hubContext;
     _conferenceCache = conferenceCache;
     Logger           = logger;
     _videoApiClient  = videoApiClient;
 }
 public VirtualRoomsController(IVideoApiClient videoApiClient, IMapperFactory mapperFactory,
                               IConferenceCache conferenceCache, ILogger <VirtualRoomsController> logger)
 {
     _videoApiClient  = videoApiClient;
     _logger          = logger;
     _conferenceCache = conferenceCache;
     _mapperFactory   = mapperFactory;
 }
Beispiel #6
0
 public ParticipantsController(IVideoApiClient videoApiClient, IEventHandlerFactory eventHandlerFactory,
                               IConferenceCache conferenceCache, ILogger <ParticipantsController> logger)
 {
     _videoApiClient      = videoApiClient;
     _eventHandlerFactory = eventHandlerFactory;
     _conferenceCache     = conferenceCache;
     _logger = logger;
 }
Beispiel #7
0
 public InstantMessagesController(IVideoApiClient videoApiClient, ILogger <InstantMessagesController> logger,
                                  IMessageDecoder messageDecoder, IConferenceCache conferenceCache)
 {
     _videoApiClient  = videoApiClient;
     _logger          = logger;
     _messageDecoder  = messageDecoder;
     _conferenceCache = conferenceCache;
 }
Beispiel #8
0
 public EventHub(IUserProfileService userProfileService, IVideoApiClient videoApiClient,
                 ILogger <EventHub> logger, IConferenceCache conferenceCache, IHeartbeatRequestMapper heartbeatRequestMapper)
 {
     _userProfileService     = userProfileService;
     _logger                 = logger;
     _conferenceCache        = conferenceCache;
     _heartbeatRequestMapper = heartbeatRequestMapper;
     _videoApiClient         = videoApiClient;
 }
 public CheckParticipantCanAccessConferenceAttribute(
     ILogger <CheckParticipantCanAccessConferenceAttribute> logger,
     IConferenceCache conferenceCache,
     IVideoApiClient videoApiClient)
 {
     _logger          = logger;
     _conferenceCache = conferenceCache;
     _videoApiClient  = videoApiClient;
 }
Beispiel #10
0
 public MediaEventController(
     IVideoApiClient videoApiClient,
     ILogger <MediaEventController> logger,
     IConferenceCache conferenceCache)
 {
     _videoApiClient  = videoApiClient;
     _logger          = logger;
     _conferenceCache = conferenceCache;
 }
Beispiel #11
0
 public ConsultationsController(IVideoApiClient videoApiClient,
                                IHubContext <EventHub.Hub.EventHub, IEventHubClient> hubContext,
                                IConferenceCache conferenceCache, ILogger <ConsultationsController> logger)
 {
     _videoApiClient  = videoApiClient;
     _hubContext      = hubContext;
     _conferenceCache = conferenceCache;
     _logger          = logger;
 }
 public EndpointsController(
     IVideoApiClient videoApiClient,
     ILogger <EndpointsController> logger,
     IMapperFactory mapperFactory,
     IConferenceCache conferenceCache)
 {
     _videoApiClient  = videoApiClient;
     _logger          = logger;
     _mapperFactory   = mapperFactory;
     _conferenceCache = conferenceCache;
 }
Beispiel #13
0
 public ConferencesController(
     IVideoApiClient videoApiClient,
     ILogger <ConferencesController> logger,
     IConferenceCache conferenceCache,
     IMapperFactory mapperFactory)
 {
     _videoApiClient  = videoApiClient;
     _logger          = logger;
     _conferenceCache = conferenceCache;
     _mapperFactory   = mapperFactory;
 }
Beispiel #14
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;
 }
Beispiel #15
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 VhOfficerCallEventHandler(IHubContext <Hub.EventHub, IEventHubClient> hubContext,
                                  IConferenceCache conferenceCache, ILogger <EventHandlerBase> logger, IVideoApiClient videoApiClient) : base(
         hubContext, conferenceCache, logger, videoApiClient)
 {
     _videoApiClient = videoApiClient;
 }
Beispiel #17
0
 public LeaveEventHandler(IHubContext <Hub.EventHub, IEventHubClient> hubContext,
                          IConferenceCache conferenceCache, ILogger <EventHandlerBase> logger, IVideoApiClient videoApiClient) : base(
         hubContext, conferenceCache, logger, videoApiClient)
 {
 }
Beispiel #18
0
 public ParticipantNotSignedInEventHandler(IHubContext <Hub.EventHub, IEventHubClient> hubContext,
                                           IConferenceCache conferenceCache, ILogger <EventHandlerBase> logger, IVideoApiClient videoApiClient) : base(
         hubContext, conferenceCache, logger, videoApiClient)
 {
 }
 public MediaEventController(IVideoApiClient videoApiClient, IConferenceCache conferenceCache)
 {
     _videoApiClient  = videoApiClient;
     _conferenceCache = conferenceCache;
 }