Example #1
0
        public void Initialization()
        {
            _splitioHttpClient = new Mock <ISplitioHttpClient>();
            _log = new Mock <ISplitLogger>();
            _telemetryRuntimeProducer = new Mock <ITelemetryRuntimeProducer>();

            _telemetryAPI = new TelemetryAPI(_splitioHttpClient.Object, "www.fake-url.com", _telemetryRuntimeProducer.Object, _log.Object);
        }
Example #2
0
        public TelemetrySyncTask(ITelemetryStorageConsumer telemetryStorage,
                                 ITelemetryAPI telemetryAPI,
                                 ISplitCache splitCache,
                                 ISegmentCache segmentCache,
                                 SelfRefreshingConfig configurationOptions,
                                 IFactoryInstantiationsService factoryInstantiationsService,
                                 IWrapperAdapter wrapperAdapter,
                                 ITasksManager tasksManager,
                                 ISplitLogger log = null)
        {
            _telemetryStorageConsumer = telemetryStorage;
            _telemetryAPI             = telemetryAPI;
            _splitCache                   = splitCache;
            _segmentCache                 = segmentCache;
            _configurationOptions         = configurationOptions;
            _factoryInstantiationsService = factoryInstantiationsService;
            _log            = log ?? WrapperAdapter.GetLogger(typeof(TelemetrySyncTask));
            _wrapperAdapter = wrapperAdapter;
            _tasksManager   = tasksManager;

            _cancellationTokenSource = new CancellationTokenSource();
        }