Example #1
0
        public void AssemblyVersionLogEntryContextProvider_AddProperties_AddsPropertyWithAssemblyName()
        {
            var assembly = typeof(AssemblyVersionLogEntryContextProvider).Assembly;
            var provider = new AssemblyVersionLogEntryContextProvider(assembly, null);
            var logEvent = new LogEvent()
            {
                EventName  = "Test event",
                Properties = new Dictionary <string, object>()
            };

            provider.AddProperties(logEvent, null);
            Assert.AreEqual(assembly.GetName().Version.ToString(), logEvent.Properties[assembly.GetName().Name]);
        }
Example #2
0
 public void AssemblyVersionLogEntryContextProvider_Constructor_ThrowsOnNullAssembly()
 {
     var provider = new AssemblyVersionLogEntryContextProvider(null);
 }
Example #3
0
 public void AssemblyVersionLogEntryContextProvider_Constructor_ConstructsOkWithNullFilter()
 {
     var provider = new AssemblyVersionLogEntryContextProvider(typeof(AssemblyVersionLogEntryContextProvider).Assembly, null);
 }
Example #4
0
 public void AssemblyVersionLogEntryContextProvider_Constructor_ConstructsOk()
 {
     var provider = new AssemblyVersionLogEntryContextProvider(typeof(AssemblyVersionLogEntryContextProvider).Assembly);
 }