public void Map_Success()
        {
            // assert
            TelemetryEvent source = new TelemetryEvent();

            // act
            EventData destination = source.Map();

            // arrange
            Assert.NotNull(destination);
        }
        public void Map_SourceNull()
        {
            // assert
            TelemetryEvent source = null;

            // act
            Action verify = () => source.Map();

            // arrange
            Assert.Throws <ArgumentNullException>("source", verify);
        }
        /// <inheritdoc />
        public void Enqueue(TelemetryEvent data)
        {
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }

            if (!_disposeToken.IsCancellationRequested)
            {
                Task.Run(() => _buffer.EnqueueAsync(data.Map()));
            }
        }