예제 #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"));
        }