Examples of ConsoleLogger


Examples of org.apache.james.jspf.ConsoleLogger

    MacroExpand defIp6me = null;

    protected void setUp() throws Exception {
        super.setUp();
        defIp4me = new MacroExpand(new rfcIP4MacroData(), new ConsoleLogger());
        defIp6me = new MacroExpand(new rfcIP6MacroData(), new ConsoleLogger());
    }
View Full Code Here

Examples of org.apache.maven.surefire.report.ConsoleLogger

    public void surefireIsConfused_ByMultipleIgnore_OnClassLevel()
        throws Exception
    {
        ReporterFactory reporterFactory = DefaultReporterFactory.defaultNoXml();
        BaseProviderFactory providerParameters = new BaseProviderFactory( reporterFactory, true );
        ConsoleLogger consoleLogger = new DefaultConsoleReporter( System.out );

        providerParameters.setReporterConfiguration( new ReporterConfiguration( new File( "" ), false ) );
        Properties junitProps = new Properties();
        junitProps.put( ProviderParameterNames.PARALLEL_PROP, "none" );
View Full Code Here

Examples of org.apache.maven.surefire.report.ConsoleLogger

    public RunResult invoke( Object forkTestSet )
        throws TestSetFailedException, ReporterException
    {
        final ReporterFactory reporterFactory = providerParameters.getReporterFactory();

        final ConsoleLogger consoleLogger = providerParameters.getConsoleLogger();

        Filter filter = jUnit48Reflector.isJUnit48Available() ? createJUnit48Filter() : null;

        if ( testsToRun == null )
        {
View Full Code Here

Examples of org.apache.maven.surefire.report.ConsoleLogger

    public void testConsole()
        throws ReporterException, IOException
    {
        final StandardTestRun standardTestRun = new StandardTestRun();
        ConsoleLogger directConsoleReporter = (ConsoleLogger) standardTestRun.run();
        directConsoleReporter.info( "HeyYou" );
        standardTestRun.assertExpected( MockReporter.CONSOLE_OUTPUT, "HeyYou" );
    }
View Full Code Here

Examples of org.codehaus.dna.impl.ConsoleLogger

    public void testConsoleWithEmptyOutput()
        throws Exception
    {
        try
        {
            new ConsoleLogger( MockConsoleLogger.LEVEL_ALL, null );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "npe.message", "output", npe.getMessage() );
            return;
View Full Code Here

Examples of org.codehaus.dna.impl.ConsoleLogger

    public void testMockConsoleOutputToConsole()
        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

Examples of org.codehaus.dna.impl.ConsoleLogger

    public void testMockConsoleOutputToConsoleWithException()
        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

Examples of org.codehaus.dna.impl.ConsoleLogger

    public void testEnableLoggingOnComponentImplementingStage()
        throws Exception
    {
        final MockComponent object = new MockComponent();
        final ConsoleLogger logger = new ConsoleLogger();

        ContainerUtil.enableLogging( object, logger );

        assertEquals( logger, object.getLogger() );
    }
View Full Code Here

Examples of org.codehaus.dna.impl.ConsoleLogger

    public void testEnableLoggingOnComponentImplementingStageButNullLogger()
        throws Exception
    {
        final MockComponent object = new MockComponent();
        final ConsoleLogger logger = null;

        try
        {
            ContainerUtil.enableLogging( object, logger );
        }
View Full Code Here

Examples of org.codehaus.dna.impl.ConsoleLogger

      final DefaultConfiguration root = new DefaultConfiguration( "root", "", "" );
      final DefaultConfiguration configuration = new DefaultConfiguration( "shutdownTimeout", "", "" );
      configuration.setValue( "22" );
      root.addChild( configuration );

      final ConsoleLogger logger = new ConsoleLogger( ConsoleLogger.LEVEL_NONE );
      manager.enableLogging( logger );
      final AcceptorMonitor monitor = manager.getMonitor();
      assertTrue( "getMonitor() instanceof DNAAcceptorMonitor", monitor instanceof DNAAcceptorMonitor );
      final DNAAcceptorMonitor dnaMonitor = (DNAAcceptorMonitor) monitor;
      assertEquals( "logger", logger, dnaMonitor.getLogger() );
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.