From d3fd5e29402b141dcae41bdf418c5698e2c5f978 Mon Sep 17 00:00:00 2001 From: Kris De Volder Date: Wed, 23 Nov 2016 13:35:27 -0800 Subject: [PATCH] Better test coverage: 'no hover' case for manifest.yml --- .../manifest/yaml/ManifestYamlEditorTest.java | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java b/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java index ab1cb793c..de4327652 100644 --- a/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java +++ b/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java @@ -377,36 +377,39 @@ public class ManifestYamlEditorTest { @Test public void hoverInfos() throws Exception { Editor editor = harness.newEditor( - "memory: 1G\n" + - "inherit: base-manifest.yml\n"+ - "applications:\n" + - "- buildpack: zbuildpack\n" + - " domain: zdomain\n" + - " name: foo\n" + - " command: java main.java\n" + - " disk_quota: 1024M\n" + - " domains:\n" + - " - pivotal.io\n" + - " - otherdomain.org\n" + - " env:\n" + - " RAILS_ENV: production\n" + - " RACK_ENV: production\n" + - " host: apppage\n" + - " hosts:\n" + - " - apppage2\n" + - " - appage3\n" + - " instances: 2\n" + - " no-hostname: true\n" + - " no-route: true\n" + - " path: somepath/app.jar\n" + - " random-route: true\n" + - " services:\n" + - " - instance_ABC\n" + - " - instance_XYZ\n" + - " stack: cflinuxfs2\n" + - " timeout: 80\n" + - " health-check-type: none\n" + "memory: 1G\n" + + "#comment\n" + + "inherit: base-manifest.yml\n"+ + "applications:\n" + + "- buildpack: zbuildpack\n" + + " domain: zdomain\n" + + " name: foo\n" + + " command: java main.java\n" + + " disk_quota: 1024M\n" + + " domains:\n" + + " - pivotal.io\n" + + " - otherdomain.org\n" + + " env:\n" + + " RAILS_ENV: production\n" + + " RACK_ENV: production\n" + + " host: apppage\n" + + " hosts:\n" + + " - apppage2\n" + + " - appage3\n" + + " instances: 2\n" + + " no-hostname: true\n" + + " no-route: true\n" + + " path: somepath/app.jar\n" + + " random-route: true\n" + + " services:\n" + + " - instance_ABC\n" + + " - instance_XYZ\n" + + " stack: cflinuxfs2\n" + + " timeout: 80\n" + + " health-check-type: none\n" ); + editor.assertNoHover("comment"); + editor.assertIsHoverRegion("memory"); editor.assertIsHoverRegion("inherit"); editor.assertIsHoverRegion("applications");