public void TestChangeConsoleLoggingLevelToWarn() { TestUtils.CheckOutput( action: () => { LoggingHelper.ChangeConsoleLoggingLevel(VerbosityLevel.Warn); LoggingHelperTest.WriteLinesForAllLogLevels(); }, check: consoleOutput => { using (var reader = new StringReader(consoleOutput.ToString())) { var output = reader.ReadToEnd(); this.CheckLinesForAllLogLevels(output, new List <LogLevel> { LogLevel.Warn }); } }); }
public void TestChangeConsoleLoggingLevelToTrace() { TestUtils.CheckOutput( action: () => { LoggingHelper.ChangeConsoleLoggingLevel(VerbosityLevel.Trace); LoggingHelperTest.WriteLinesForAllLogLevels(); }, check: consoleOutput => { using (var reader = new StringReader(consoleOutput.ToString())) { this.CheckLinesForAllLogLevels( reader.ReadToEnd(), new List <LogLevel> { LogLevel.Warn, LogLevel.Info, LogLevel.Debug, LogLevel.Trace }); } }); }