Exemplo n.º 1
0
        public void OSVersionLogEventContextProvider_AddProperties_AddsProperty()
        {
            var provider = new OSVersionLogEventContextProvider();
            var logEvent = new LogEvent()
            {
                EventName  = "Test event",
                Properties = new Dictionary <string, object>()
            };

            provider.AddProperties(logEvent, null);
            Assert.AreEqual(Environment.OSVersion.Version.ToString(), logEvent.Properties["OS Version"]);
        }