コード例 #1
0
        public static void InfoRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Info(new Exception("InfoLog"), new Dictionary<string, object> { { "InfoInfo", new object() } }, "InfoMessage", 1, 2, 3);

            var entry = Assert.Single(spy.Entries);
            Assert.Equal(TraceEventType.Information, entry.Type);
            Assert.Contains("InfoLog", entry.Exception.Message);
            Assert.Contains("InfoInfo", entry.AdditionalInfo.Keys);
            Assert.Equal("InfoMessage", entry.Message);
        }
コード例 #2
0
        public void InfoRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Info(new Exception("InfoLog"), new Dictionary<string, object> { { "InfoInfo", new Object() } }, "InfoMessage", 1, 2, 3);

            Assert.Equal(1, spy.Messages.Count);
            Assert.Contains("INFO", spy.Messages[0]);
            Assert.Contains("InfoLog", spy.Messages[0]);
            Assert.Contains("InfoInfo", spy.Messages[0]);
            Assert.Contains("InfoMessage", spy.Messages[0]);
        }
コード例 #3
0
        public void InfoRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Info(new Exception("InfoLog"), new Dictionary <string, object> {
                { "InfoInfo", new Object() }
            }, "InfoMessage", 1, 2, 3);

            Assert.Equal(1, spy.Messages.Count);
            Assert.Contains("INFO", spy.Messages[0]);
            Assert.Contains("InfoLog", spy.Messages[0]);
            Assert.Contains("InfoInfo", spy.Messages[0]);
            Assert.Contains("InfoMessage", spy.Messages[0]);
        }
コード例 #4
0
        public static void InfoRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Info(new Exception("InfoLog"), new Dictionary <string, object> {
                { "InfoInfo", new object() }
            }, "InfoMessage", 1, 2, 3);

            var entry = Assert.Single(spy.Entries);

            Assert.Equal(TraceEventType.Information, entry.Type);
            Assert.Contains("InfoLog", entry.Exception.Message);
            Assert.Contains("InfoInfo", entry.AdditionalInfo.Keys);
            Assert.Equal("InfoMessage", entry.Message);
        }