Package org.apache.avalon.fortress.impl

Examples of org.apache.avalon.fortress.impl.ComponentHandlerMetaData


        super( name );
    }

    public void testMetaData()
    {
        ComponentHandlerMetaData meta = new ComponentHandlerMetaData( "component1",
            Component1.class.getName(), new DefaultConfiguration( "test" ), true );

        assertNotNull( meta );
        assertNotNull( meta.getClassname() );
        assertNotNull( meta.getConfiguration() );
        assertNotNull( meta.getName() );
        assertEquals( true, meta.isLazyActivation() );
        assertEquals( "component1", meta.getName() );
        assertEquals( Component1.class.getName(), meta.getClassname() );
        assertEquals( "test", meta.getConfiguration().getName() );
    }
View Full Code Here


    public void testNullPointerException()
    {
        try
        {
            new ComponentHandlerMetaData( null, Component1.class.getName(),
                new DefaultConfiguration( "test" ), false );

            fail( "No NullPointerException was thrown" );
        }
        catch ( NullPointerException npe )
        {
            // SUCCESS!!
        }
        catch ( Exception e )
        {
            fail( "Did not throw the correct exception: " + e.getClass().getName() );
        }

        try
        {
            new ComponentHandlerMetaData( "component1", null,
                new DefaultConfiguration( "test" ), false );

            fail( "No NullPointerException was thrown" );
        }
        catch ( NullPointerException npe )
        {
            // SUCCESS!!
        }
        catch ( Exception e )
        {
            fail( "Did not throw the correct exception: " + e.getClass().getName() );
        }

        try
        {
            new ComponentHandlerMetaData( "component1", Component1.class.getName(),
                null, false );

            fail( "No NullPointerException was thrown" );
        }
        catch ( NullPointerException npe )
View Full Code Here

    }

    public void testComponentHandlerEntry()
    {
        ComponentHandler handler = new TestComponentHandler();
        ComponentHandlerMetaData meta = new ComponentHandlerMetaData(
            "component1", Component1.class.getName(),
            new DefaultConfiguration( "test" ), true );
        ComponentHandlerEntry entry = new ComponentHandlerEntry( handler, meta );

        assertNotNull( entry );
View Full Code Here

    }

    public void testNullPointerException()
    {
        ComponentHandler handler = new TestComponentHandler();
        ComponentHandlerMetaData meta = new ComponentHandlerMetaData(
            "component1", Component1.class.getName(),
            new DefaultConfiguration( "test" ), true );

        try
        {
View Full Code Here

    }

    public void testComponentHandlerEntry()
    {
        ComponentHandler handler = new TestComponentHandler();
        ComponentHandlerMetaData meta = new ComponentHandlerMetaData(
            "component1", Component1.class.getName(),
            new DefaultConfiguration( "test" ), true );
        ComponentHandlerEntry entry = new ComponentHandlerEntry( handler, meta );

        assertNotNull( entry );
View Full Code Here

    }

    public void testNullPointerException()
    {
        ComponentHandler handler = new TestComponentHandler();
        ComponentHandlerMetaData meta = new ComponentHandlerMetaData(
            "component1", Component1.class.getName(),
            new DefaultConfiguration( "test" ), true );

        try
        {
View Full Code Here

        super( name );
    }

    public void testMetaData()
    {
        ComponentHandlerMetaData meta = new ComponentHandlerMetaData( "component1",
            Component1.class.getName(), new DefaultConfiguration( "test" ), true );

        assertNotNull( meta );
        assertNotNull( meta.getClassname() );
        assertNotNull( meta.getConfiguration() );
        assertNotNull( meta.getName() );
        assertEquals( true, meta.isLazyActivation() );
        assertEquals( "component1", meta.getName() );
        assertEquals( Component1.class.getName(), meta.getClassname() );
        assertEquals( "test", meta.getConfiguration().getName() );
    }
View Full Code Here

    public void testNullPointerException()
    {
        try
        {
            new ComponentHandlerMetaData( null, Component1.class.getName(),
                new DefaultConfiguration( "test" ), false );

            fail( "No NullPointerException was thrown" );
        }
        catch ( NullPointerException npe )
        {
            // SUCCESS!!
        }
        catch ( Exception e )
        {
            fail( "Did not throw the correct exception: " + e.getClass().getName() );
        }

        try
        {
            new ComponentHandlerMetaData( "component1", null,
                new DefaultConfiguration( "test" ), false );

            fail( "No NullPointerException was thrown" );
        }
        catch ( NullPointerException npe )
        {
            // SUCCESS!!
        }
        catch ( Exception e )
        {
            fail( "Did not throw the correct exception: " + e.getClass().getName() );
        }

        try
        {
            new ComponentHandlerMetaData( "component1", Component1.class.getName(),
                null, false );

            fail( "No NullPointerException was thrown" );
        }
        catch ( NullPointerException npe )
View Full Code Here

TOP

Related Classes of org.apache.avalon.fortress.impl.ComponentHandlerMetaData

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.