From 08500509e22bc943392fd6b03165c1112fa18348 Mon Sep 17 00:00:00 2001 From: Kris De Volder Date: Wed, 24 Oct 2018 11:36:31 -0700 Subject: [PATCH] Add pojo property inheritance test for app.properties Also, cleanup some defunct test code and comments. --- .../test/ApplicationPropertiesEditorTest.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/boot/test/ApplicationPropertiesEditorTest.java b/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/boot/test/ApplicationPropertiesEditorTest.java index 56414a443..537176254 100644 --- a/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/boot/test/ApplicationPropertiesEditorTest.java +++ b/headless-services/spring-boot-language-server/src/test/java/org/springframework/ide/vscode/boot/test/ApplicationPropertiesEditorTest.java @@ -72,26 +72,22 @@ public class ApplicationPropertiesEditorTest extends AbstractPropsEditorTest { projectContents.createFile("src/main/resources/application.yml", ""); }; + @Test public void inheritedPojoProperties() throws Exception { + //See https://github.com/spring-projects/sts4/issues/116 + useProject(createPredefinedMavenProject("cloud-rabbit-project")); + + Editor editor = newEditor( + "spring.cloud.stream.rabbit.bindings.input.consumer.auto-bind-dlq: no-bool" + ); + editor.assertProblems("no-bool|boolean"); + } + @Test public void testReconcileCatchesParseError() throws Exception { Editor editor = newEditor("key\n"); editor.assertProblems("key|extraneous input"); } - public void linterRunsOnDocumentOpenAndChange() throws Exception { - Editor editor = newEditor("key"); - - editor.assertProblems("key|mismatched input"); - - editor.setText( - "problem\n" + - "key=value\n" + - "another" - ); - - editor.assertProblems("problem|extraneous input", "another|mismatched input"); - } - @Test public void bug_158348104() throws Exception { //See: https://www.pivotaltracker.com/story/show/158348104 data("spring.activemq.close-timeout", "java.time.Duration", null, null); @@ -274,8 +270,6 @@ public class ApplicationPropertiesEditorTest extends AbstractPropsEditorTest { @Test public void testEnableApt() throws Throwable { MavenJavaProject p = createPredefinedMavenProject("boot-1.2.0-properties-live-metadta"); - //Check some assumptions about the initial state of the test project (if these checks fail then - // the test may be 'vacuous' since the things we are testing for already exist beforehand. Path metadataFile = getOutputFolder(p).resolve(PropertiesLoader.PROJECT_META_DATA_LOCATIONS[0]); assertTrue(metadataFile.toFile().isFile()); assertContains("\"name\": \"foo.counter\"", Files.toString(metadataFile.toFile(), Charset.forName("UTF8")));