public void ThrowsAndEventNotTracedIfStartEventWasNotCalled()
        {
            const string name = "ToString";
            Type         type = typeof(int);

            var helper = new TaskExecutorTracingHelper(_chromeTracingLogger, _timeSource);

            Assert.Throws <InvalidOperationException>(
                () => helper.OnAsyncTaskEnded(
                    this, new AsyncTaskEndedEventArgs {
                CallerName = name, CallerType = type
            }));

            _logger.DidNotReceive()
            .Trace(Arg.Is <string>(eventTraced => _verifyNotMetadataEvent(eventTraced)));
        }
        public void EventTracedWhenCallingStartAndEndEvents()
        {
            const string name = "ToString";
            Type         type = typeof(int);

            var helper = new TaskExecutorTracingHelper(_chromeTracingLogger, _timeSource);

            helper.OnAsyncTaskStarted(this, EventArgs.Empty);
            helper.OnAsyncTaskEnded(
                this, new AsyncTaskEndedEventArgs {
                CallerName = name, CallerType = type
            });

            _logger.Received(1)
            .Trace(Arg.Is <string>(eventTraced => _verifyNotMetadataEvent(eventTraced)));
        }