Example #1
0
        public void ProcessIdLogEventContextProvider_AddProperties_AddsProperty()
        {
            var provider = new ProcessIdLogEventContextProvider();
            var logEvent = new LogEvent()
            {
                EventName  = "Test event",
                Properties = new Dictionary <string, object>()
            };

            provider.AddProperties(logEvent, null);
            Assert.AreEqual(System.Diagnostics.Process.GetCurrentProcess().Id, logEvent.Properties["Process ID"]);
        }
Example #2
0
 public void ProcessIdLogEventContextProvider_Constructor_ConstructsOkWithNullFilter()
 {
     var provider = new ProcessIdLogEventContextProvider(null);
 }
Example #3
0
 public void ProcessIdLogEventContextProvider_Constructor_ConstructsOk()
 {
     var provider = new ProcessIdLogEventContextProvider();
 }