public void setup() { h = new flexHandler(); h.setLevel(loggerLevels.CRITICAL); testMessage = "Testing handler"; consoleOut = new StringWriter(); Console.SetOut(consoleOut); }
public void logger_sendDebug() { string testMessage = "this is a test"; flexHandler h = new flexHandler(); h.setLevel(loggerLevels.DEBUG); b_logger.addHandler(h); StringWriter consoleOut = new StringWriter(); Console.SetOut(consoleOut); b_logger.debug(testMessage); Assert.AreEqual(consoleOut.ToString(), testMessage + "\r\n"); }
public void setup() { l = new logger("logger_critical"); l.setLevel(loggerLevels.CRITICAL); flexHandler h = new flexHandler(); h.setLevel(loggerLevels.ERROR); l.addHandler(h); testMessage = "Testing Logger {0}, {1}"; testMessageResult = String.Format(testMessage, argsTest); consoleOut = new StringWriter(); Console.SetOut(consoleOut); }
public void tearDown() { h = null; Console.SetOut(stdOut); }
public void tearDown() { h = null; }
public void setup() { h = new flexHandler(); }