Beispiel #1
0
        public SplitsWorkerTests()
        {
            _log          = new Mock <ISplitLogger>();
            _synchronizer = new Mock <ISynchronizer>();
            _splitCache   = new Mock <ISplitCache>();

            _splitsWorker = new SplitsWorker(_splitCache.Object, _synchronizer.Object, _log.Object);
        }
Beispiel #2
0
 public NotificationProcessor(ISplitsWorker splitsWorker,
                              ISegmentsWorker segmentsWorker,
                              ISplitLogger log = null)
 {
     _log            = log ?? WrapperAdapter.GetLogger(typeof(EventSourceClient));
     _splitsWorker   = splitsWorker;
     _segmentsWorker = segmentsWorker;
 }
Beispiel #3
0
        public SplitsWorkerTests()
        {
            _log          = new Mock <ISplitLogger>();
            _synchronizer = new Mock <ISynchronizer>();
            _splitCache   = new Mock <ISplitCache>();

            _splitsWorker = new SplitsWorker(_splitCache.Object, _synchronizer.Object, new TasksManager(wrapperAdapter), _log.Object);
        }
Beispiel #4
0
        public SSEHandler(string streaminServiceUrl,
                          ISplitsWorker splitsWorker,
                          ISegmentsWorker segmentsWorker,
                          INotificationProcessor notificationPorcessor,
                          INotificationManagerKeeper notificationManagerKeeper,
                          ISplitLogger log = null,
                          IEventSourceClient eventSourceClient = null)
        {
            _streaminServiceUrl        = streaminServiceUrl;
            _splitsWorker              = splitsWorker;
            _segmentsWorker            = segmentsWorker;
            _notificationPorcessor     = notificationPorcessor;
            _notificationManagerKeeper = notificationManagerKeeper;
            _log = log ?? WrapperAdapter.GetLogger(typeof(SSEHandler));
            _eventSourceClient = eventSourceClient;

            _eventSourceClient.EventReceived += EventReceived;
            _eventSourceClient.ActionEvent   += OnAction;
        }