Ejemplo n.º 1
0
 @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);
 }
Ejemplo n.º 2
0
 @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);
 }