Exemplo n.º 1
0
        public static void FatalRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Fatal(new Exception("FatalLog"), new Dictionary<string, object> { { "FatalInfo", new object() } }, "FatalMessage", 1, 2, 3);

            var entry = Assert.Single(spy.Entries);
            Assert.Equal(TraceEventType.Critical, entry.Type);
            Assert.Contains("FatalLog", entry.Exception.Message);
            Assert.Contains("FatalInfo", entry.AdditionalInfo.Keys);
            Assert.Equal("FatalMessage", entry.Message);
        }
Exemplo n.º 2
0
        public void FatalRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Fatal(new Exception("FatalLog"), new Dictionary<string, object> { { "FatalInfo", new Object() } }, "FatalMessage", 1, 2, 3);

            Assert.Equal(1, spy.Messages.Count);
            Assert.Contains("CRITICAL", spy.Messages[0]);
            Assert.Contains("FatalLog", spy.Messages[0]);
            Assert.Contains("FatalInfo", spy.Messages[0]);
            Assert.Contains("FatalMessage", spy.Messages[0]);
        }
Exemplo n.º 3
0
        public void FatalRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Fatal(new Exception("FatalLog"), new Dictionary <string, object> {
                { "FatalInfo", new Object() }
            }, "FatalMessage", 1, 2, 3);

            Assert.Equal(1, spy.Messages.Count);
            Assert.Contains("CRITICAL", spy.Messages[0]);
            Assert.Contains("FatalLog", spy.Messages[0]);
            Assert.Contains("FatalInfo", spy.Messages[0]);
            Assert.Contains("FatalMessage", spy.Messages[0]);
        }
Exemplo n.º 4
0
        public static void FatalRecordsToLog()
        {
            var spy = new SpyLog();

            spy.Fatal(new Exception("FatalLog"), new Dictionary <string, object> {
                { "FatalInfo", new object() }
            }, "FatalMessage", 1, 2, 3);

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

            Assert.Equal(TraceEventType.Critical, entry.Type);
            Assert.Contains("FatalLog", entry.Exception.Message);
            Assert.Contains("FatalInfo", entry.AdditionalInfo.Keys);
            Assert.Equal("FatalMessage", entry.Message);
        }