public SemanticLogAdapterTests() { channels.Add(channel); A.CallTo(() => channel.Log(A <SemanticLogLevel> .Ignored, A <string> .Ignored)) .Invokes((SemanticLogLevel level, string message) => { output = message; }); log = new Lazy <SemanticLog>(() => new SemanticLog(channels, new List <ILogAppender>(), JsonLogWriterFactory.Default())); sut = SemanticLogLoggerProvider.ForTesting(log.Value); }
public void Should_provide_null_logger_when_no_log_provided() { var provider = SemanticLogLoggerProvider.ForTesting(null); Assert.Same(provider.CreateLogger("test"), NullLogger.Instance); }