public void ShouldSucceedForMaxLevel() { using (var textWriter = new StringWriter()) { NLogTextWriterHelpers.ConfigureNLogToTextWriterOnNewLoggingConfiguration(textWriter, LogLevel.Debug, LogLevel.Error); } }
public void ShouldSucceedForTextWriter() { using (var textWriter = new StringWriter()) { NLogTextWriterHelpers.ConfigureNLogToTextWriterOnNewLoggingConfiguration(textWriter); } }
public void ThrowsArgumentNullExceptionForLoggerNamePattern() { using (var textWriter = new StringWriter()) { var exception = Assert.Throws <ArgumentNullException>(() => NLogTextWriterHelpers.ConfigureNLogToTextWriterOnNewLoggingConfiguration(textWriter, LogLevel.Debug, LogLevel.Error, null)); Assert.Equal("loggerNamePattern", exception.ParamName); } }
public void ThrowsArgumentNullExceptionForMinLevel() { using (var textWriter = new StringWriter()) { var exception = Assert.Throws <ArgumentNullException>(() => NLogTextWriterHelpers.ConfigureNLogToTextWriterOnNewLoggingConfiguration(textWriter, null)); Assert.Equal("minLevel", exception.ParamName); } }
public void ThrowsArgumentNullExceptionForTextWriter() { var exception = Assert.Throws <ArgumentNullException>(() => NLogTextWriterHelpers.ConfigureNLogToTextWriterOnNewLoggingConfiguration(null)); Assert.Equal("textWriter", exception.ParamName); }