Package org.apache.avalon.framework.configuration

Examples of org.apache.avalon.framework.configuration.DefaultConfiguration.addChild()


    }

    public void testAddChild() throws Exception
    {
        DefaultConfiguration result = new DefaultConfiguration( "a", "b" );
        result.addChild( new DefaultConfiguration( "kid1", "b" ) );
        result.addChild( new DefaultConfiguration( "kid2", "b" ) );

        DefaultConfiguration base = new DefaultConfiguration( "a", "b" );
        base.addChild( new DefaultConfiguration( "kid1", "b" ) );
View Full Code Here


    public void testAddChild() throws Exception
    {
        DefaultConfiguration result = new DefaultConfiguration( "a", "b" );
        result.addChild( new DefaultConfiguration( "kid1", "b" ) );
        result.addChild( new DefaultConfiguration( "kid2", "b" ) );

        DefaultConfiguration base = new DefaultConfiguration( "a", "b" );
        base.addChild( new DefaultConfiguration( "kid1", "b" ) );

        DefaultConfiguration layer = new DefaultConfiguration( "a", "b" );
View Full Code Here

        DefaultConfiguration result = new DefaultConfiguration( "a", "b" );
        result.addChild( new DefaultConfiguration( "kid1", "b" ) );
        result.addChild( new DefaultConfiguration( "kid2", "b" ) );

        DefaultConfiguration base = new DefaultConfiguration( "a", "b" );
        base.addChild( new DefaultConfiguration( "kid1", "b" ) );

        DefaultConfiguration layer = new DefaultConfiguration( "a", "b" );
        layer.addChild( new DefaultConfiguration( "kid2", "b" ) );

        assertTrue( ConfigurationUtil.equals( result, ConfigurationMerger.merge( layer, base ) ) );
View Full Code Here

        DefaultConfiguration base = new DefaultConfiguration( "a", "b" );
        base.addChild( new DefaultConfiguration( "kid1", "b" ) );

        DefaultConfiguration layer = new DefaultConfiguration( "a", "b" );
        layer.addChild( new DefaultConfiguration( "kid2", "b" ) );

        assertTrue( ConfigurationUtil.equals( result, ConfigurationMerger.merge( layer, base ) ) );
        assertTrue( ConfigurationUtil.equals( layer, ConfigurationSplitter.split( result, base ) ));
    }
View Full Code Here

            }

            if( object instanceof Context )
            {
                final Context child = (Context)object;
                configuration.addChild( build( child ) );
            }
        }

        return configuration;
    }
View Full Code Here

            DefaultConfiguration headers = new DefaultConfiguration("headers", "");
            child = new DefaultConfiguration("parameter", "");
            child.setAttribute("name", "accept");
            child.setAttribute("value", this.acceptHeader);
            headers.addChild(child);

            child = new DefaultConfiguration("parameter", "");
            child.setAttribute("name", "user-agent");
            child.setAttribute("value", this.agentHeader);
            headers.addChild(child);
View Full Code Here

            headers.addChild(child);

            child = new DefaultConfiguration("parameter", "");
            child.setAttribute("name", "user-agent");
            child.setAttribute("value", this.agentHeader);
            headers.addChild(child);

            configuration.addChild(headers);

            // create a Cocoon instance
            cocoonFactory = new CocoonFactory();
View Full Code Here

        {
            TestElement item = (TestElement) iter.next();
            DefaultConfiguration config =
                new DefaultConfiguration("node", "node");

            config.addChild(getConfigForTestElement(null, item));
            List configList = getConfigsFromTree(subTree.getTree(item));
            Iterator iter2 = configList.iterator();

            while (iter2.hasNext())
            {
View Full Code Here

            List configList = getConfigsFromTree(subTree.getTree(item));
            Iterator iter2 = configList.iterator();

            while (iter2.hasNext())
            {
                config.addChild((Configuration) iter2.next());
            }
            configs.add(config);
        }
        return configs;
    }
View Full Code Here

        SampleResult[] subResults = result.getSubResults();

        for (int i = 0; i < subResults.length; i++)
        {
            config.addChild(getConfiguration(subResults[i], funcTest));
        }

        AssertionResult[] assResults = result.getAssertionResults();

        if (funcTest)
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.