Exemple #1
0
        public void TestLogEventInfoToJson()
        {
            var log = new LogEventInfo(LogLevel.Info, "foobar", "barfoo", null);
            var json = log.ToJson();

            // check...
            Assert.False(string.IsNullOrEmpty(json));
        }
Exemple #2
0
        public void TestLogEventInfoToJson()
        {
            var log  = new LogEventInfo(LogLevel.Info, "foobar", "barfoo", null);
            var json = log.ToJson();

            // check...
            Assert.False(string.IsNullOrEmpty(json));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        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));
        }
Exemple #5
0
        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));
        }