示例#1
0
        public void Metrics_one_with_prefix()
        {
            var evt = new LogEventInfo("Test", "App")
            {
                Metrics =
                {
                    ["M1"] = 5
                }
            };

            Assert.That(evt.ToString(), Is.EqualTo("Event: App.Test |App.M1: 5"));
        }
示例#2
0
        public void Metrics_one()
        {
            var evt = new LogEventInfo("Test")
            {
                Metrics =
                {
                    ["M1"] = 5
                }
            };

            Assert.That(evt.ToString(), Is.EqualTo("Event: Test |M1: 5"));
        }
示例#3
0
        public void Properties_one_with_prefix()
        {
            var evt = new LogEventInfo("Test", "App")
            {
                Properties =
                {
                    ["Prop1"] = "Value 1"
                }
            };

            Assert.That(evt.ToString(), Is.EqualTo("Event: App.Test |App.Prop1: Value 1"));
        }
示例#4
0
        public void Properties_one()
        {
            var evt = new LogEventInfo("Test")
            {
                Properties =
                {
                    ["Prop1"] = "Value 1"
                }
            };

            Assert.That(evt.ToString(), Is.EqualTo("Event: Test |Prop1: Value 1"));
        }
示例#5
0
        public void Metrics_multiple()
        {
            var evt = new LogEventInfo("Test")
            {
                Metrics =
                {
                    ["M1"] = 5,
                    ["M2"] = 1.589
                }
            };

            Assert.That(evt.ToString(), Is.EqualTo("Event: Test |M1: 5 |M2: 1.589"));
        }
示例#6
0
        public void Properties_and_Metrics_multiple_with_prefix()
        {
            var evt = new LogEventInfo("Test", "App")
            {
                Metrics =
                {
                    ["M1"] = 5,
                    ["M2"] = 1.589
                },
                Properties =
                {
                    ["Prop1"] = "Value 1",
                    ["Prop2"] = "Value 2"
                }
            };

            Assert.That(evt.ToString(), Is.EqualTo("Event: App.Test |App.Prop1: Value 1 |App.Prop2: Value 2 |App.M1: 5 |App.M2: 1.589"));
        }
示例#7
0
        public void Properties_and_Metrics_multiple()
        {
            var evt = new LogEventInfo("Test")
            {
                Metrics =
                {
                    ["M1"] = 5,
                    ["M2"] = 1.589
                },
                Properties =
                {
                    ["Prop1"] = "Value 1",
                    ["Prop2"] = "Value 2"
                }
            };

            Assert.That(evt.ToString(), Is.EqualTo("Event: Test |Prop1: Value 1 |Prop2: Value 2 |M1: 5 |M2: 1.589"));
        }
示例#8
0
        public void EventName_Only()
        {
            var evt = new LogEventInfo("Test");

            Assert.That(evt.ToString(), Is.EqualTo("Event: Test"));
        }
示例#9
0
        public void EventName_with_prefix()
        {
            var evt = new LogEventInfo("Test", "App");

            Assert.That(evt.ToString(), Is.EqualTo("Event: App.Test"));
        }