コード例 #1
0
        public void setup()
        {
            h = new flexHandler();
            h.setLevel(loggerLevels.CRITICAL);

            testMessage = "Testing handler";

            consoleOut = new StringWriter();

            Console.SetOut(consoleOut);
        }
コード例 #2
0
        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");
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public void tearDown()
 {
     h = null;
     Console.SetOut(stdOut);
 }
コード例 #5
0
 public void tearDown()
 {
     h = null;
 }
コード例 #6
0
 public void setup()
 {
     h = new flexHandler();
 }