System.setProperty("jconfig.parser","org.jconfig.parser.DefaultConfigParser");
}
public void testParseNestedConfig() {
System.setProperty("jconfig.parser","org.jconfig.parser.NestedConfigParser");
Configuration config = ConfigurationManager.getConfiguration("nested");
String next = config.getProperty("inner",null,"inner/myinner");
assertEquals("value",next);
next = config.getProperty("hello",null,"inner/myinner/moreinner");
assertEquals("universe",next);
next = config.getProperty("text",null,"inner/2");
assertNull(next);
next = config.getProperty("special",null,"inner/2");
assertEquals("one",next);
config.setProperty("max","10000","inner/myinner/moreinner");
next = config.getProperty("max",null,"inner/myinner/moreinner");
assertEquals("10000",next);
next = config.getProperty("vartest","not set","inner/myinner/moreinner");
assertEquals("VarValue-is here",next);
config.removeProperty("max","inner/myinner/moreinner");
next = config.getProperty("max",null,"inner/myinner/moreinner");
assertEquals(null,next);
}