public void IsLogExhaustiveTest() { var levels = System.Enum.GetValues(typeof(NatvisLoggingLevel)) .Cast <NatvisLoggingLevel>(); var logFactory = new NLog.LogFactory(); var logger = new NatvisDiagnosticLogger(logFactory.CreateNullLogger(), levels.Max()); // Make sure that all logging level switch is exhaustive. // <c>logger.Log(...)</c> will throw an exception if the passed in level is not handled. foreach (var level in levels) { logger.Log(level, "test message"); } }