private static void assertDependencyChild( String msg, String groupId, String artifactId, String tag, Element dep) { if (groupId != null) { assertEquals(msg + ":groupId", groupId, PomEdits.getTextValue(findChild(dep, "groupId"))); } else { assertNull(msg + ":groupId", findChild(dep, "groupId")); } if (artifactId != null) { assertEquals( msg + ":artifactId", artifactId, PomEdits.getTextValue(findChild(dep, "artifactId"))); } else { assertNull(msg + ":artifactId", findChild(dep, "artifactId")); } assertNotNull(msg + ":tag", findChild(dep, tag)); }
private String getTextChild(Element depEl, String name) { Element child = findChild(depEl, name); if (child != null) { return PomEdits.getTextValue(child); } return null; }
public static String getTextValue(Node element) { return PomEdits.getTextValue(element); }
public String getValue(Document document) { return PomEdits.getTextValue(find(document)); }