use of org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SRootNode in project sts4 by spring-projects.
the class YamlStructureParserTest method findAndTraversPathPath.
private void findAndTraversPathPath(MockYamlEditor editor, String snippet) throws Exception {
SRootNode root = editor.parseStructure();
SNode node = root.find(editor.startOf(snippet));
assertNotNull(node);
YamlPath path = node.getPath();
SNode actualNode = path.traverse((SNode) root);
assertEquals(node, actualNode);
}
use of org.springframework.ide.vscode.commons.yaml.structure.YamlStructureParser.SRootNode in project sts4 by spring-projects.
the class YamlStructureParserTest method testTreeEndKeyNodeNoChildren.
@Test
public void testTreeEndKeyNodeNoChildren() throws Exception {
MockYamlEditor editor = new MockYamlEditor("world:\n" + " europe:\n" + " canada:\n" + " montreal: poutine\n" + " vancouver:\n" + " salmon\n" + "moon:\n" + " moonbase-alfa:\n" + " moonstone\n");
SRootNode root = editor.parseStructure();
SNode node = getNodeAtPath(root, 0, 0, 0);
assertTreeText(editor, node, " europe:");
}
Aggregations