@Test public void testValidateArgumentsWithoutQuotes() throws Exception { Config config = ConfigFactory.parseString("{ foo : bar, see : you.there.soon }"); Configs configs = new Configs(); assertEquals("bar", configs.getString(config, "foo")); assertEquals("you.there.soon", configs.getString(config, "see")); configs.validateArguments(config); }
@Test public void testValidateArgumentsWithQuotes() throws Exception { Config config = ConfigFactory.parseString("{ foo : bar, \"see\" : \"you.there.soon.~!@#$%^&*()_+=-\" }"); Configs configs = new Configs(); assertEquals("bar", configs.getString(config, "foo")); assertEquals("you.there.soon.~!@#$%^&*()_+=-", configs.getString(config, "see")); configs.validateArguments(config); }