use of org.springframework.boot.configurationsample.generic.SimpleGenericProperties in project spring-boot by spring-projects.
the class GenericsMetadataGenerationTests method simpleGenericProperties.
@Test
void simpleGenericProperties() {
ConfigurationMetadata metadata = compile(AbstractGenericProperties.class, SimpleGenericProperties.class);
assertThat(metadata).has(Metadata.withGroup("generic").fromSource(SimpleGenericProperties.class));
assertThat(metadata).has(Metadata.withProperty("generic.name", String.class).fromSource(SimpleGenericProperties.class).withDescription("Generic name.").withDefaultValue(null));
assertThat(metadata).has(Metadata.withProperty("generic.mappings", "java.util.Map<java.lang.Integer,java.time.Duration>").fromSource(SimpleGenericProperties.class).withDescription("Generic mappings.").withDefaultValue(null));
assertThat(metadata.getItems()).hasSize(3);
}
Aggregations