Package org.codehaus.dna.impl

Examples of org.codehaus.dna.impl.ConsoleLogger.debug()


        throws Exception
    {
        final ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream();
        final PrintStream output = new PrintStream( arrayOutput );
        final ConsoleLogger logger = new ConsoleLogger( MockConsoleLogger.LEVEL_ALL, output );
        logger.debug( "ignore me!", null );
        final String message = arrayOutput.toString();
        final String expectedMessage =
            "[DEBUG] ignore me!" + System.getProperty( "line.separator" );
        assertEquals( "message", expectedMessage, message );
    }
View Full Code Here


        throws Exception
    {
        final ByteArrayOutputStream arrayOutput = new ByteArrayOutputStream();
        final PrintStream output = new PrintStream( arrayOutput );
        final ConsoleLogger logger = new ConsoleLogger( MockConsoleLogger.LEVEL_ALL, output );
        logger.debug( "ignore me!", new Throwable( "Ignore me aswell!" ) );
        final String message = arrayOutput.toString();
        final String expectedMessage =
            "[DEBUG] ignore me!" + System.getProperty( "line.separator" );
        assertTrue( "message", message.startsWith( expectedMessage ) );
        assertTrue( "throwable message", -1 != message.indexOf( "Ignore me aswell!" ) );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.