public void DelegateLogEventContextProvider_AddProperties_AddsProperty() { var provider = new DelegateLogEventContextProvider("Test Property", () => Guid.NewGuid().ToString()); var logEvent = new LogEvent() { EventName = "Test event", Properties = new Dictionary <string, object>() }; provider.AddProperties(logEvent, null); Guid.Parse((string)logEvent.Properties["Test Property"]); }
public void DelegateLogEventContextProvider_Constructor_ThrowsOnNullFunction() { var provider = new DelegateLogEventContextProvider("Test Property", null); }
public void DelegateLogEventContextProvider_Constructor_ConstructsOkWithNullFilter() { var provider = new DelegateLogEventContextProvider("Test Property", () => Guid.NewGuid().ToString(), null); }
public void DelegateLogEventContextProvider_Constructor_ThrowsOnNullPropertyName() { var provider = new DelegateLogEventContextProvider(null, () => Guid.NewGuid().ToString()); }