This commit is contained in:
Phillip Webb
2015-11-03 20:36:20 -08:00
parent fd1cbed51c
commit 6c2ea4648f
32 changed files with 190 additions and 141 deletions

View File

@@ -205,11 +205,9 @@ public class ConfigurationMetadataAnnotationProcessorTests {
ConfigurationMetadata metadata = compile(type);
assertThat(metadata, containsGroup("not.deprecated").fromSource(type));
assertThat(metadata, containsProperty("not.deprecated.counter", Integer.class)
.withNoDeprecation()
.fromSource(type));
.withNoDeprecation().fromSource(type));
assertThat(metadata, containsProperty("not.deprecated.flag", Boolean.class)
.withNoDeprecation()
.fromSource(type));
.withNoDeprecation().fromSource(type));
}
@Test
@@ -217,10 +215,10 @@ public class ConfigurationMetadataAnnotationProcessorTests {
Class<?> type = BoxingPojo.class;
ConfigurationMetadata metadata = compile(type);
assertThat(metadata, containsGroup("boxing").fromSource(type));
assertThat(metadata, containsProperty("boxing.flag", Boolean.class)
.fromSource(type));
assertThat(metadata, containsProperty("boxing.counter", Integer.class)
.fromSource(type));
assertThat(metadata,
containsProperty("boxing.flag", Boolean.class).fromSource(type));
assertThat(metadata,
containsProperty("boxing.counter", Integer.class).fromSource(type));
}
@Test
@@ -366,12 +364,9 @@ public class ConfigurationMetadataAnnotationProcessorTests {
null, null, true, null);
writeAdditionalMetadata(property);
ConfigurationMetadata metadata = compile(SimpleProperties.class);
assertThat(metadata,
containsProperty("simple.flag", Boolean.class)
.fromSource(SimpleProperties.class)
.withDescription("A simple flag.")
.withDeprecation(null, null)
.withDefaultValue(is(true)));
assertThat(metadata, containsProperty("simple.flag", Boolean.class)
.fromSource(SimpleProperties.class).withDescription("A simple flag.")
.withDeprecation(null, null).withDefaultValue(is(true)));
assertThat(metadata.getItems().size(), is(4));
}

View File

@@ -19,8 +19,8 @@ package org.springframework.boot.configurationsample.specific;
import org.springframework.boot.configurationsample.ConfigurationProperties;
/**
* Demonstrate the use of boxing/unboxing. Even if the type does not
* strictly match, it should still be detected.
* Demonstrate the use of boxing/unboxing. Even if the type does not strictly match, it
* should still be detected.
*
* @author Stephane Nicoll
*/

View File

@@ -19,8 +19,8 @@ package org.springframework.boot.configurationsample.specific;
import org.springframework.boot.configurationsample.ConfigurationProperties;
/**
* Demonstrate that an unrelated setter is not taken into account
* to detect the deprecated flag.
* Demonstrate that an unrelated setter is not taken into account to detect the deprecated
* flag.
*
* @author Stephane Nicoll
*/