public void Given_Message_Info_ShouldLog_Information(LogEventLevel logLevel, string message) { var logger = this._fixture.ArrangeLogger(logLevel, out TestSink sink); LoggerExtensions.Info(logger, message); sink.LogItems.Count.Should().Be(1); var log = sink.LogItems.Single(); log.Level.Should().Be(logLevel); log.MessageTemplate.Text.Should().BeEquivalentTo(message); }
public void Given_NullParameter_Info_ShouldThrow_Exception() { Action action = () => LoggerExtensions.Info(null, null); action.ShouldThrow <ArgumentNullException>(); }