public void testTrue() { String value = "[owner]\n" + "name=asfdasasdfsa\n" + "organization=asfdasdf\n"; try { Parse.parse(value); HashMap<String, HashMap<String, String>> file = Parse.getFile(); // .get("owner"); if (file == null) { logger.log(Level.SEVERE, "file undefined error"); } else { HashMap<String, String> section = file.get("[owner]"); if (section == null) { logger.log(Level.INFO, " section undefined"); } else { section.forEach((k, v) -> logger.log(Level.INFO, k + " " + v)); } } } catch (Exception e) { logger.log(Level.SEVERE, e.getMessage(), e.getCause()); } }
public void testCadenaTexto3() { String value = "\"\n\\\u1234\""; logger.log(Level.INFO, value); TestCase.assertEquals(value, "\"\n\\ሴ\"", Parse.parse(value)); }
public void testCadenaTexto2() { String value = "\"abcde\""; logger.log(Level.INFO, value); TestCase.assertEquals(value, "\"abcde\"", Parse.parse(value)); }