Package org.codehaus.loom.components.util.metadata

Examples of org.codehaus.loom.components.util.metadata.DependencyDirective


    public void testArrayAssembly()
        throws Exception
    {
        final DependencyDirective[] c3Deps =
            new DependencyDirective[]{new DependencyDirective( S1_ARRAY_NAME,
                                                               "c2a",
                                                               "c2a" ),
                                      new DependencyDirective( S1_ARRAY_NAME,
                                                               "c2b",
                                                               "c2b" ),
                                      new DependencyDirective( S1_ARRAY_NAME,
                                                               "c2c",
                                                               "c2c" )};
        final ComponentTemplate md3 =
            new ComponentTemplate( "c3",
                                   C3_NAME,
View Full Code Here


    public void testMapAssembly()
        throws Exception
    {
        final DependencyDirective[] c4Deps =
            new DependencyDirective[]{new DependencyDirective( S1_MAP_NAME,
                                                               "c2a",
                                                               "c2a" ),
                                      new DependencyDirective( S1_MAP_NAME,
                                                               "c2b",
                                                               "c2b" ),
                                      new DependencyDirective( S1_MAP_NAME,
                                                               "c2c",
                                                               "anAlias" )};
        final ComponentTemplate md4 =
            new ComponentTemplate( "c4",
                                   C4_NAME,
View Full Code Here

                      Component3.class.getName(),
                      block4.getTemplate().getImplementationKey() );
        assertEquals( "Block4 getName", "c3", block4.getTemplate().getName() );
        assertEquals( "Block4 getDependencies count",
                      3, dependencies4.length );
        final DependencyDirective dependency1 = dependencies4[0];
        final DependencyDirective dependency2 = dependencies4[1];
        final DependencyDirective dependency3 = dependencies4[2];
        assertEquals( "Block4 dep1 name",
                      "c2a",
                      dependency1.getProviderName() );
        assertEquals( "Block4 dep1 role",
                      Service1.class.getName(), dependency1.getKey() );
        assertEquals( "Block4 dep1 name",
                      "c2b",
                      dependency2.getProviderName() );
        assertEquals( "Block4 dep1 role",
                      Service1.class.getName(), dependency2.getKey() );
        assertEquals( "Block4 dep1 name",
                      "c2c",
                      dependency3.getProviderName() );
        assertEquals( "Block4 dep1 role",
                      Service1.class.getName(), dependency3.getKey() );
        assertTrue( "Block4 getBlockInfo non null",
                    null != block4.getInfo() );
        assertEquals( "Block4 isDisableProxy",
                      false,
                      isProxyDisabled( block4 ) );
View Full Code Here

        final String role = "com.biz.Service";
        final Assembler assembler = new Assembler();
        final DefaultConfiguration provide = new DefaultConfiguration( "provide", "", "" );
        provide.setAttribute( "name", name );
        provide.setAttribute( "role", role );
        final DependencyDirective directive =
            assembler.buildDependency( provide );
        assertEquals( "name", name, directive.getProviderName() );
        assertEquals( "role", role, directive.getKey() );
        assertEquals( "alias", alias, directive.getAlias() );
    }
View Full Code Here

        final Assembler assembler = new Assembler();
        final DefaultConfiguration provide = new DefaultConfiguration( "provide", "", "" );
        provide.setAttribute( "name", name );
        provide.setAttribute( "role", role );
        provide.setAttribute( "alias", alias );
        final DependencyDirective directive =
            assembler.buildDependency( provide );
        assertEquals( "name", name, directive.getProviderName() );
        assertEquals( "role", role, directive.getKey() );
        assertEquals( "alias", alias, directive.getAlias() );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.loom.components.util.metadata.DependencyDirective

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.