Polish contribution
Closes gh-7491
This commit is contained in:
@@ -352,6 +352,17 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
assertThat(metadata).isNotEqualTo(Metadata.withProperty("specific.foo"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nestedClassChildProperties() throws Exception {
|
||||
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));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void builderPojo() throws IOException {
|
||||
ConfigurationMetadata metadata = compile(BuilderPojo.class);
|
||||
@@ -768,17 +779,6 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nestedClassChildProperties() throws Exception {
|
||||
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));
|
||||
}
|
||||
|
||||
private static class AdditionalMetadata {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user