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