public void NotUseFormatterIfNotExists(string template) { var context = new LogContext(LogLevel.Debug, _sender, template); var message = new JsonObject(); context.RenderMessage(message).Should().BeEquivalentTo(template); }
public void UseFormatter() { var context = new LogContext(LogLevel.Debug, _sender, "Template", _formatter.Object); var message = new JsonObject(); context.RenderMessage(message); _formatter.Verify(formatter => formatter .Write(message, It.IsNotNull <TextWriter>())); }