Esempio n. 1
0
        public void LocalTimeTest()
        {
            var dt = new LongDateLayoutRenderer();

            dt.UniversalTime = false;

            var ei = new LogEventInfo(LogLevel.Info, "logger", "msg");

            Assert.Equal(ei.TimeStamp.ToString("yyyy-MM-dd HH:mm:ss.ffff", CultureInfo.InvariantCulture), dt.Render(ei));
        }
Esempio n. 2
0
        public void UniversalTimeTest()
        {
            var dt = new LongDateLayoutRenderer();

            dt.UniversalTime = true;

            var ei = new LogEventInfo(LogLevel.Info, "logger", "msg");

            Assert.AreEqual(ei.TimeStamp.ToUniversalTime().ToString("yyyy-MM-dd HH:mm:ss.ffff"), dt.Render(ei));
        }