public LoggerBindingShould()
        {
            _sut = new LoggerBinding(ParameterInfo, () => _currentLoggerFactory());

            IFixture fixture = new Fixture().Customize(new AutoMoqCustomization());

            // A JToken is needed deep into the object graph for a ValueBindingContext
            fixture.Inject <JToken>(new JObject());

            _valueBindingContext = fixture.Create <ValueBindingContext>();
            _bindingContext      = fixture.Create <BindingContext>();
        }
        public async Task UseTheGlobalLoggerIfNoneSpecified()
        {
            // Arrange - Use a different constructor to test whether the global logger is used.
            var sut = new LoggerBinding(ParameterInfo);

            // Set-up the global logger to be a ILogEventSink.
            var mockSink = new Mock <ILogEventSink>();

            Log.Logger = mockSink.As <ILogger>().Object;

            // Act
            var provider = (LoggerValueProvider)await sut.BindAsync(_bindingContext).ConfigureAwait(false);

            // Assert
            provider.Log.Error("A message");
            mockSink.Verify(s => s.Emit(It.IsAny <LogEvent>()), Times.Once);
        }