Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.HierarchicalConfiguration.addProperty()


    }

    @Test
    public void shouldNotEqualWhenConfig2HasAllKeysFromConfig1ButAlsoANewOne() {
        HierarchicalConfiguration hc1 = new HierarchicalConfiguration();
        hc1.addProperty("key1", "value1");
        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
        hc2.addProperty("key1", "value1");
        hc2.addProperty("new-key", "value1");
View Full Code Here


        HierarchicalConfiguration hc1 = new HierarchicalConfiguration();
        hc1.addProperty("key1", "value1");
        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
        hc2.addProperty("key1", "value1");
        hc2.addProperty("new-key", "value1");
        ExtensionConfiguration config2 = new ExtensionConfiguration("ns", "name", hc2);

        Assert.assertFalse(config1.equals(config2));
    }
View Full Code Here

        hc1.addProperty("key1", "value1");
        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
        hc2.addProperty("key1", "value1");
        hc2.addProperty("new-key", "value1");
        ExtensionConfiguration config2 = new ExtensionConfiguration("ns", "name", hc2);

        Assert.assertFalse(config1.equals(config2));
    }
View Full Code Here

    }

    @Test
    public void shouldNotEqualWhenValuesInConfigAreDifferentDeeperInHierarchy() {
        HierarchicalConfiguration hc1 = new HierarchicalConfiguration();
        hc1.addProperty("key1", "value1");
        HierarchicalConfiguration hc1i = new HierarchicalConfiguration();
        hc1i.addProperty("key2i", "value2i");
        hc1.addProperty("key2", hc1i);

        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);
View Full Code Here

    @Test
    public void shouldNotEqualWhenValuesInConfigAreDifferentDeeperInHierarchy() {
        HierarchicalConfiguration hc1 = new HierarchicalConfiguration();
        hc1.addProperty("key1", "value1");
        HierarchicalConfiguration hc1i = new HierarchicalConfiguration();
        hc1i.addProperty("key2i", "value2i");
        hc1.addProperty("key2", hc1i);

        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
View Full Code Here

        hc1.addProperty("key2", hc1i);

        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
        hc2.addProperty("key1", "value1");

        HierarchicalConfiguration hc2i = new HierarchicalConfiguration();
        hc2i.addProperty("key2i", "value-not the same");
        hc2.addProperty("key2", hc2i);
        ExtensionConfiguration config2 = new ExtensionConfiguration("ns", "name", hc2);
View Full Code Here

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
        hc2.addProperty("key1", "value1");

        HierarchicalConfiguration hc2i = new HierarchicalConfiguration();
        hc2i.addProperty("key2i", "value-not the same");
        hc2.addProperty("key2", hc2i);
        ExtensionConfiguration config2 = new ExtensionConfiguration("ns", "name", hc2);

        Assert.assertFalse(config1.equals(config2));
    }
View Full Code Here

    }

    @Test
    public void shouldEqualWhenValuesInConfigAreSameDeeperInHierarchy() {
        HierarchicalConfiguration hc1 = new HierarchicalConfiguration();
        hc1.addProperty("key1", "value1");
        HierarchicalConfiguration hc1i = new HierarchicalConfiguration();
        hc1i.addProperty("key2i", "value2i");
        hc1.addProperty("key2", hc1i);

        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);
View Full Code Here

    @Test
    public void shouldEqualWhenValuesInConfigAreSameDeeperInHierarchy() {
        HierarchicalConfiguration hc1 = new HierarchicalConfiguration();
        hc1.addProperty("key1", "value1");
        HierarchicalConfiguration hc1i = new HierarchicalConfiguration();
        hc1i.addProperty("key2i", "value2i");
        hc1.addProperty("key2", hc1i);

        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
View Full Code Here

        hc1.addProperty("key2", hc1i);

        ExtensionConfiguration config1 = new ExtensionConfiguration("ns", "name", hc1);

        HierarchicalConfiguration hc2 = new HierarchicalConfiguration();
        hc2.addProperty("key1", "value1");

        HierarchicalConfiguration hc2i = new HierarchicalConfiguration();
        hc2i.addProperty("key2i", "value2i");
        hc2.addProperty("key2", hc2i);
        ExtensionConfiguration config2 = new ExtensionConfiguration("ns", "name", hc2);
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.