use of org.springframework.boot.configurationsample.simple.HierarchicalProperties in project spring-boot by spring-projects.
the class ConfigurationMetadataAnnotationProcessorTests method hierarchicalProperties.
@Test
void hierarchicalProperties() {
ConfigurationMetadata metadata = compile(HierarchicalProperties.class, HierarchicalPropertiesParent.class, HierarchicalPropertiesGrandparent.class);
assertThat(metadata).has(Metadata.withGroup("hierarchical").fromSource(HierarchicalProperties.class));
assertThat(metadata).has(Metadata.withProperty("hierarchical.first", String.class).withDefaultValue("one").fromSource(HierarchicalProperties.class));
assertThat(metadata).has(Metadata.withProperty("hierarchical.second", String.class).withDefaultValue("two").fromSource(HierarchicalProperties.class));
assertThat(metadata).has(Metadata.withProperty("hierarchical.third", String.class).withDefaultValue("three").fromSource(HierarchicalProperties.class));
}
Aggregations