public void Info_MessageWithException() { // Prepare const string message = "Exception occurred"; var ex = new Exception(message); logger.Setup(l => l.Write( LogEventLevel.Information, ex, message, null)) .Verifiable(); log = new SerilogLogger(logger.Object); // Act log.Info(message, ex); // Assert logger.VerifyAll(); }
public void Info_LambdaMessage() { // Prepare const string message = "Simple Message"; logger.Setup(l => l.Write( LogEventLevel.Information, message, null)) .Verifiable(); log = new SerilogLogger(logger.Object); // Act log.Info(message); // Assert logger.VerifyAll(); }