use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method gotoResourceTypeDefinition.
@Test
public void gotoResourceTypeDefinition() throws Exception {
Editor editor = harness.newEditor("resource_types:\n" + "- name: slack-notification\n" + " type: docker-image\n" + "resources:\n" + "- name: zazazee\n" + " type: slack-notification\n");
editor.assertGotoDefinition(editor.positionOf("type: slack-notification", "slack-notification"), editor.rangeOf("- name: slack-notification", "slack-notification"));
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method noAutoInsertRequiredSourcePropertiesIfPresent.
@Test
public void noAutoInsertRequiredSourcePropertiesIfPresent() throws Exception {
Editor editor;
// Most common case
editor = harness.newEditor("resources:\n" + "- name: source-repo\n" + " type: <*>\n" + " source:");
editor.assertCompletionWithLabel((l) -> l.startsWith("pool"), "resources:\n" + "- name: source-repo\n" + " type: pool<*>\n" + " source:");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method timeResourceSourceReconcile.
@Test
public void timeResourceSourceReconcile() throws Exception {
Editor editor;
editor = harness.newEditor("resources:\n" + "- name: every5minutes\n" + " type: time\n" + " source:\n" + " location: PST8PDT\n" + " start: 7AM\n" + " stop: 8AM\n" + " interval: 5m\n" + " days:\n" + " - Thursday\n");
editor.assertProblems("every5minutes|Unused");
editor = harness.newEditor("resources:\n" + "- name: every5minutes\n" + " type: time\n" + " source:\n" + " location: some-location\n" + " start: the-start-time\n" + " stop: the-stop-time\n" + " interval: the-interval\n" + " days:\n" + " - Monday\n" + " - Someday\n");
editor.assertProblems("every5minutes|Unused", "some-location|Unknown 'Location'", "the-start-time|not a valid 'Time'", "the-stop-time|not a valid 'Time'", "the-interval|not a valid 'Duration'", "Someday|unknown 'Day'");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method relaxedContentAssistContextForListItem_sameLine.
@Test
public void relaxedContentAssistContextForListItem_sameLine() throws Exception {
Editor editor;
editor = harness.newEditor("jobs:\n" + "- name: build-docker-image\n" + " plan: <*>\n");
editor.assertCompletionWithLabel("- put", "jobs:\n" + "- name: build-docker-image\n" + " plan: \n" + " - put: <*>\n");
editor = harness.newEditor("jobs:\n" + "- name: build-docker-image\n" + " plan: pu<*>\n");
editor.assertCompletionWithLabel("- put", "jobs:\n" + "- name: build-docker-image\n" + " plan: \n" + " - put: <*>\n");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method bug_152918825_no_reconciling_for_double_parens_placeholders.
@Test
public void bug_152918825_no_reconciling_for_double_parens_placeholders() throws Exception {
// https://www.pivotaltracker.com/story/show/152918825
Editor editor = harness.newEditor("resources:\n" + "- name: image-XXX\n" + " type: docker-image\n" + " source:\n" + " repository: ((DOCKER_IMAGE))\n" + " insecure_registries: ((DOCKER_INSECURE_REGISTRIES))\n" + " tag: latest");
editor.assertProblems("image-XXX|Unused 'Resource'");
}
Aggregations