use of org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SKeyNode in project sts4 by spring-projects.
the class YamlStructureParserTest method assertFirstRealChild.
private void assertFirstRealChild(MockYamlEditor editor, String testNodeName, String expectedNodeSnippet) throws Exception {
SDocNode doc = getOnlyDocument(editor.parseStructure());
SKeyNode testNode = doc.getChildWithKey(testNodeName);
assertNotNull(testNode);
SNode expected = null;
if (expectedNodeSnippet != null) {
int offset = editor.getRawText().indexOf(expectedNodeSnippet);
expected = doc.find(offset);
assertTrue(editor.textUnder(expected).contains(expectedNodeSnippet));
}
assertEquals(expected, testNode.getFirstRealChild());
}
Aggregations