use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method reconcilerRaceCondition.
@Test
public void reconcilerRaceCondition() throws Exception {
SynchronizationPoint reconcilerThreadStart = harness.reconcilerThreadStart();
Editor editor = harness.newEditor("garbage");
// Blocks until the reconciler thread is reached.
reconcilerThreadStart.reached();
try {
String editorContents = editor.getRawText();
for (int i = 0; i < 4; i++) {
editorContents = "\n" + editorContents;
editor.setText(editorContents);
}
} finally {
reconcilerThreadStart.unblock();
}
editor.assertRawText("\n" + "\n" + "\n" + "\n" + "garbage");
editor.assertProblems("garbage|Expecting a 'Map'");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method githubCompletionsOwners.
@Test
public void githubCompletionsOwners() throws Exception {
when(github.getOwners()).thenReturn(ImmutableList.of("kdvolder", "spring-projects", "spring-guides"));
Editor editor = harness.newEditor("resources:\n" + "- name: my-repo\n" + " type: git\n" + " source:\n" + " uri: <*>");
editor.assertContextualCompletions("git@github.com:<*>", "git@github.com:kdvolder/<*>", "git@github.com:spring-guides/<*>", "git@github.com:spring-projects/<*>");
editor.assertContextualCompletions("git@github.com:vol<*>", "git@github.com:kdvolder/<*>");
editor.assertContextualCompletions("https://github.com/<*>", "https://github.com/kdvolder/<*>", "https://github.com/spring-guides/<*>", "https://github.com/spring-projects/<*>");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method testReconcileCatchesParseError.
@Test
public void testReconcileCatchesParseError() throws Exception {
Editor editor = harness.newEditor("somemap: val\n" + "- sequence");
editor.assertProblems("-|expected <block end>");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method putStepHovers.
@Test
public void putStepHovers() throws Exception {
Editor editor = harness.newEditor("jobs:\n" + "- name: some-job\n" + " plan:\n" + " - put: something\n" + " resource: something\n" + " params:\n" + " some_param: some_value\n" + " get_params:\n" + " skip_download: true\n");
editor.assertHoverContains("resource", "The resource to update");
editor.assertHoverContains("params", "A map of arbitrary configuration");
editor.assertHoverContains("get_params", "A map of arbitrary configuration to forward to the resource that will be utilized during the implicit `get` step");
}
use of org.springframework.ide.vscode.languageserver.testharness.Editor in project sts4 by spring-projects.
the class ConcourseEditorTest method bug_150337510.
@Test
public void bug_150337510() throws Exception {
// See: https://www.pivotaltracker.com/story/show/150337510
Editor editor = harness.newEditor("resources:\n" + "- name: test\n" + " type: s3\n" + " source:\n" + " bucket: blah\n" + " regexp: blah/blah*.tar.gz\n" + "jobs:\n" + "- name: build-it\n" + " plan:\n" + " - task: build-it\n" + " file: tasks/build-it.yml\n" + " on_success:\n" + " put: test\n" + "- name: create-website\n" + " plan:\n" + " - get: test\n" + " passed:\n" + " - build-it");
editor.assertProblems();
}
Aggregations