@Test public void testGetAllSectionGlobal() { // 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); assertEquals(ImmutableMap.of("int", "1"), config.getAllSectionGlobal("section1")); assertEquals(ImmutableMap.of("string", "2"), config.getAllSectionGlobal("section1.subsection")); assertEquals(ImmutableMap.of("int", "1", "string", "4"), config.getAllSectionGlobal("section1.subsection.subsub")); }
@Test public void testGetAllSectionGlobal() { // 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); assertEquals(ImmutableMap.of("int", "1"), config.getAllSectionGlobal("section1")); assertEquals(ImmutableMap.of("string", "2"), config.getAllSectionGlobal("section1.subsection")); assertEquals(ImmutableMap.of("int", "1", "string", "4"), config.getAllSectionGlobal("section1.subsection.subsub")); }