Package aQute.maven

Examples of aQute.maven.BasicPom$Configuration


    {
        HierarchicalConfiguration<?> declConfig = setUpConfig(reload);
        ConfigurationDeclaration decl = createDeclaration(declConfig);
        ConfigurationBuilder<? extends Configuration> builder =
                createProvider().getConfigurationBuilder(decl);
        Configuration config = builder.getConfiguration();
        assertEquals("Wrong configuration class",
                PropertiesConfiguration.class, config.getClass());
        PropertiesConfiguration pconfig = (PropertiesConfiguration) config;
        assertTrue("Wrong exception flag",
                pconfig.isThrowExceptionOnMissing());
        DefaultListDelimiterHandler listHandler =
                (DefaultListDelimiterHandler) pconfig.getListDelimiterHandler();
View Full Code Here


        else if (value instanceof Configuration)
        {
            // display a flat Configuration as a dictionary
            out.println(padding + "<dict>");

            Configuration config = (Configuration) value;
            Iterator<String> it = config.getKeys();
            while (it.hasNext())
            {
                // create a node for each property
                String key = it.next();
                ImmutableNode node =
                        new ImmutableNode.Builder().name(key)
                                .value(config.getProperty(key)).create();

                // print the node
                printNode(out, indentLevel + 1, node);

                if (it.hasNext())
View Full Code Here

        {
            // display a flat Configuration as a dictionary
            out.println();
            out.println(padding + "{");

            Configuration config = (Configuration) value;
            Iterator<String> it = config.getKeys();
            while (it.hasNext())
            {
                String key = it.next();
                ImmutableNode node =
                        new ImmutableNode.Builder().name(key)
                                .value(config.getProperty(key)).create();
                InMemoryNodeModel tempModel = new InMemoryNodeModel(node);
                printNode(out, indentLevel + 1, node, tempModel.getNodeHandler());
                out.println(";");
            }
            out.println(padding + "}");
View Full Code Here

        File outFile = ConfigurationAssert.getOutFile("save.properties");
        Parameters parameters = new Parameters();
        FileBasedConfigurationBuilder<PropertiesConfiguration> builder = new FileBasedConfigurationBuilder<PropertiesConfiguration>(
                PropertiesConfiguration.class, null, true).configure(parameters
                .properties().setFile(outFile));
        Configuration config = builder.getConfiguration();
        config.setProperty(PROP, 1);
        builder.save();
        checkSavedConfig(outFile, 1);
        assertTrue("Could not remove test file", outFile.delete());
    }
View Full Code Here

public class TestServletRequestConfiguration extends TestAbstractConfiguration
{
    @Override
    protected AbstractConfiguration getConfiguration()
    {
        final Configuration configuration = new BaseConfiguration();
        configuration.setProperty("key1", "value1");
        configuration.setProperty("key2", "value2");
        configuration.addProperty("list", "value1");
        configuration.addProperty("list", "value2");
        configuration.addProperty("listesc", "value1\\,value2");

        return createConfiguration(configuration);
    }
View Full Code Here

        BaseConfiguration config = new BaseConfiguration();
        config.addProperty(listKey, values);

        assertEquals("Wrong number of list elements", values.length, config.getList(listKey).size());

        Configuration c = createConfiguration(config);
        List<?> v = c.getList(listKey);

        assertEquals("Wrong number of elements in list", values.length, v.size());

        for (int i = 0; i < values.length; i++)
        {
View Full Code Here

        BasicConfigurationBuilder<? extends HierarchicalConfiguration<ImmutableNode>> defBuilder =
                createDefinitionBuilder(defConfig);
        builder.configure(new CombinedBuilderParametersImpl()
                .setDefinitionBuilder(defBuilder).setBasePath(
                        deepDir.getAbsolutePath()));
        Configuration config = builder.getConfiguration();
        assertEquals("Wrong property value", "somevalue",
                config.getString("somekey"));
    }
View Full Code Here

        File optionalFile =
                ConfigurationAssert
                        .getTestFile("testDigesterOptionalConfiguration.xml");
        builder.configure(createParameters()
                .setFile(optionalFile));
        Configuration config = builder.getConfiguration();
        assertTrue(config.getBoolean("test.boolean"));
        assertEquals("value", config.getProperty("element"));
    }
View Full Code Here

        builder.configure(createParameters()
                .setFile(testFile));
        CombinedConfiguration cc = builder.getConfiguration();
        assertTrue("Lookup not registered in CC", cc.getInterpolator()
                .getLookups().containsKey("test"));
        Configuration xmlConf = cc.getConfiguration("xml");
        assertTrue("Lookup not registered in sub config", xmlConf
                .getInterpolator().getLookups().containsKey("test"));
    }
View Full Code Here

        // required params we don't care about in this test, so we set them to dummy values for all test cases
        settings.put("password_secret", "thisisatest");
        settings.put("retention_strategy", "delete");
        settings.put("root_password_sha2", "thisisatest");

        Configuration configuration = new Configuration();
        try {
            new JadConfig(new InMemoryRepository(settings), configuration).process();
        } catch (ValidationException | RepositoryException e) {
            fail(e.getMessage());
        }
View Full Code Here

TOP

Related Classes of aQute.maven.BasicPom$Configuration

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.