Пример #1
0
 public void MapLogLevel_ToString_ReturnsExpected()
 {
     Assert.Equal("OFF", LoggerLevels.MapLogLevel(LogLevel.None));
     Assert.Equal("FATAL", LoggerLevels.MapLogLevel(LogLevel.Critical));
     Assert.Equal("ERROR", LoggerLevels.MapLogLevel(LogLevel.Error));
     Assert.Equal("WARN", LoggerLevels.MapLogLevel(LogLevel.Warning));
     Assert.Equal("INFO", LoggerLevels.MapLogLevel(LogLevel.Information));
     Assert.Equal("DEBUG", LoggerLevels.MapLogLevel(LogLevel.Debug));
     Assert.Equal("TRACE", LoggerLevels.MapLogLevel(LogLevel.Trace));
 }
Пример #2
0
 public void MapLogLevel_FromString_ReturnsExpected()
 {
     Assert.Equal(LogLevel.None, LoggerLevels.MapLogLevel("OFF"));
     Assert.Equal(LogLevel.Critical, LoggerLevels.MapLogLevel("FATAL"));
     Assert.Equal(LogLevel.Error, LoggerLevels.MapLogLevel("ERROR"));
     Assert.Equal(LogLevel.Warning, LoggerLevels.MapLogLevel("WARN"));
     Assert.Equal(LogLevel.Information, LoggerLevels.MapLogLevel("INFO"));
     Assert.Equal(LogLevel.Debug, LoggerLevels.MapLogLevel("DEBUG"));
     Assert.Equal(LogLevel.Trace, LoggerLevels.MapLogLevel("TRACE"));
     Assert.Null(LoggerLevels.MapLogLevel("FooBar"));
 }