public void TestLogEventInfoToJson() { var log = new LogEventInfo(LogLevel.Info, "foobar", "barfoo", null); var json = log.ToJson(); // check... Assert.False(string.IsNullOrEmpty(json)); }
public void TestLogEventInfoToJson() { var log = new LogEventInfo(LogLevel.Info, "foobar", "barfoo", null); var json = log.ToJson(); // check... Assert.False(string.IsNullOrEmpty(json)); }
public void TestLogEventInfoWithExceptionToJson() { // create... var log = new LogEventInfo(LogLevel.Info, "foobar", "barfoo", new InvalidOperationException("Testing.")); var json = log.ToJson(); // check... Assert.False(string.IsNullOrEmpty(json)); }
public void TestLogEventInfoWithExceptionToJson() { // create... var log = new LogEventInfo(LogLevel.Info, "foobar", "barfoo", new InvalidOperationException("Testing.")); var json = log.ToJson(); // check... Assert.False(string.IsNullOrEmpty(json)); }
public void TestLogEventInfoWithExceptionToJson() { Exception theEx = null; try { throw new InvalidOperationException("Testing."); } catch (Exception ex) { theEx = ex; } // create... var log = new LogEventInfo(LogLevel.Info, "foobar", "barfoo", theEx); var json = log.ToJson(); // check... Assert.False(string.IsNullOrEmpty(json)); }