Ejemplo n.º 1
0
        public void setup()
        {
            h = new flexHandler();
            h.setLevel(loggerLevels.CRITICAL);

            testMessage = "Testing handler";

            consoleOut = new StringWriter();

            Console.SetOut(consoleOut);
        }
Ejemplo n.º 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");
        }
Ejemplo 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);
        }