public void WriteAddLogEntryToDatabase() { var target = new DbContextTargetDouble(); target.Write(new LogEventInfo(LogLevel.Debug, LoggerName, "some debug message")); using(var context = new LoggingContext(ConnectionStringName)) { Assert.That(context.Log.Any(e => e.Logger == LoggerName)); } }
public void WriteAddLogEntryToDatabase() { var target = new DbContextTargetDouble(); target.Write(new LogEventInfo(LogLevel.Debug, LoggerName, "some debug message")); using (var context = new LoggingContext(ConnectionStringName)) { Assert.That(context.Log.Any(e => e.Logger == LoggerName)); } }