Polish formatting

This commit is contained in:
Phillip Webb
2016-12-19 12:37:54 -08:00
parent 4b9cba351b
commit 6121208cbb
46 changed files with 110 additions and 88 deletions

View File

@@ -59,7 +59,8 @@ class TypeElementMembers {
private final FieldValuesParser fieldValuesParser;
TypeElementMembers(ProcessingEnvironment env, FieldValuesParser fieldValuesParser, TypeElement element) {
TypeElementMembers(ProcessingEnvironment env, FieldValuesParser fieldValuesParser,
TypeElement element) {
this.env = env;
this.typeUtils = new TypeUtils(this.env);
this.fieldValuesParser = fieldValuesParser;

View File

@@ -357,10 +357,18 @@ public class ConfigurationMetadataAnnotationProcessorTests {
ConfigurationMetadata metadata = compile(ClassWithNestedProperties.class);
assertThat(metadata).has(Metadata.withGroup("nestedChildProps")
.fromSource(ClassWithNestedProperties.NestedChildClass.class));
assertThat(metadata).has(Metadata.withProperty("nestedChildProps.child-class-property", Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class).withDefaultValue(20));
assertThat(metadata).has(Metadata.withProperty("nestedChildProps.parent-class-property", Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class).withDefaultValue(10));
assertThat(metadata)
.has(Metadata
.withProperty("nestedChildProps.child-class-property",
Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(20));
assertThat(metadata)
.has(Metadata
.withProperty("nestedChildProps.parent-class-property",
Integer.class)
.fromSource(ClassWithNestedProperties.NestedChildClass.class)
.withDefaultValue(10));
}
@Test

View File

@@ -52,6 +52,7 @@ public class DeprecatedMethodConfig {
public void setFlag(boolean flag) {
this.flag = flag;
}
}
}

View File

@@ -36,6 +36,7 @@ public class ClassWithNestedProperties {
public void setParentClassProperty(int parentClassProperty) {
this.parentClassProperty = parentClassProperty;
}
}
@ConfigurationProperties(prefix = "nestedChildProps")
@@ -50,5 +51,7 @@ public class ClassWithNestedProperties {
public void setChildClassProperty(int childClassProperty) {
this.childClassProperty = childClassProperty;
}
}
}