Package org.apache.avalon.excalibur.testcase

Examples of org.apache.avalon.excalibur.testcase.FullLifecycleComponent


    }

    public void testOutOfOrderInitialize()
        throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        component.contextualize( new DefaultContext() );
        try
        {
            component.initialize();
            component.parameterize( new Parameters() );
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here


    }

    public void testOutOfOrderDispose()
        throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        component.contextualize( new DefaultContext() );
        component.service( new DefaultServiceManager() );
        component.configure( new DefaultConfiguration( "", "" ) );
        component.parameterize( new Parameters() );
        component.initialize();
        component.start();
        component.suspend();
        component.resume();

        try
        {
            component.dispose();
            component.stop();
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here

        fail( "Did not detect out of order disposal" );
    }

    public void testDoubleAssignOfLogger()
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        try
        {
            component.enableLogging( new NullLogger() );
            component.enableLogging( new NullLogger() );
        }
        catch( Exception e )
        {
            // test successfull
            return;
View Full Code Here

        fail( "Did not detect double assignment of Logger" );
    }

    public void testDoubleAssignOfContext()
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        try
        {
            component.contextualize( new DefaultContext() );
            component.contextualize( new DefaultContext() );
        }
        catch( Exception e )
        {
            // test successfull
            return;
View Full Code Here

    }

    public void testDoubleAssignOfParameters()
        throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        component.contextualize( new DefaultContext() );
        component.service( new DefaultServiceManager() );
        component.configure( new DefaultConfiguration( "", "" ) );

        try
        {
            component.parameterize( new Parameters() );
            component.parameterize( new Parameters() );
        }
        catch( Exception e )
        {
            // test successfull
            return;
View Full Code Here

        fail( "Did not detect double assignment of Parameters" );
    }

    public void testDoubleAssignOfConfiguration() throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        component.contextualize( new DefaultContext() );
        component.service( new DefaultServiceManager() );

        try
        {
            component.configure( new DefaultConfiguration( "", "" ) );
            component.configure( new DefaultConfiguration( "", "" ) );
        }
        catch( Exception e )
        {
            // test successfull
            return;
View Full Code Here

    }

    public void testCorrectLifecycle()
        throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        component.contextualize( new DefaultContext() );
        component.service( new DefaultServiceManager() );
        component.configure( new DefaultConfiguration( "", "" ) );
        component.parameterize( new Parameters() );
        component.initialize();
        component.start();
        component.suspend();
        component.resume();
        component.stop();
        component.dispose();
    }
View Full Code Here

    }

    public void testMissingLogger()
        throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        try
        {
            component.contextualize( new DefaultContext() );
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here

    }

    public void testOutOfOrderInitialize()
        throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        component.contextualize( new DefaultContext() );
        try
        {
            component.initialize();
            component.parameterize( new Parameters() );
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here

    }

    public void testOutOfOrderDispose()
        throws Exception
    {
        FullLifecycleComponent component = new FullLifecycleComponent();

        component.enableLogging( new NullLogger() );
        component.contextualize( new DefaultContext() );
        component.service( new DefaultServiceManager() );
        component.configure( new DefaultConfiguration( "", "" ) );
        component.parameterize( new Parameters() );
        component.initialize();
        component.start();
        component.suspend();
        component.resume();

        try
        {
            component.dispose();
            component.stop();
        }
        catch( Exception e )
        {
            return;
        }
View Full Code Here

TOP

Related Classes of org.apache.avalon.excalibur.testcase.FullLifecycleComponent

Copyright © 2018 www.massapicom. 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.