config.removeGlobal(name); } else { config.remove(name);
config.removeGlobal(name); } else { config.remove(name);
@Test public void testRemoveGlobal() { // Test integer and string config.putGlobal("section1.int", 1); config.putGlobal("section1.subsection.string", "2"); config.putGlobal("section1.subsection.subsub.int", 1); config.putGlobal("section1.subsection.subsub.string", "4"); config.putGlobal("section2.int", 3); assertTrue(config.getGlobal("section1.int").isPresent()); config.removeGlobal("section1.int"); assertFalse(config.getGlobal("section1.int").isPresent()); assertTrue(config.getGlobal("section1.subsection.subsub.string").isPresent()); config.removeGlobal("section1.subsection.subsub.string"); assertFalse(config.getGlobal("section1.subsection.subsub.string").isPresent()); }
@Test public void testRemoveGlobal() { // Test integer and string config.putGlobal("section1.int", 1); config.putGlobal("section1.subsection.string", "2"); config.putGlobal("section1.subsection.subsub.int", 1); config.putGlobal("section1.subsection.subsub.string", "4"); config.putGlobal("section2.int", 3); assertTrue(config.getGlobal("section1.int").isPresent()); config.removeGlobal("section1.int"); assertFalse(config.getGlobal("section1.int").isPresent()); assertTrue(config.getGlobal("section1.subsection.subsub.string").isPresent()); config.removeGlobal("section1.subsection.subsub.string"); assertFalse(config.getGlobal("section1.subsection.subsub.string").isPresent()); }