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

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

            // check...
            Assert.False(string.IsNullOrEmpty(json));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }
Esempio n. 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));
        }