use of org.springframework.boot.configurationsample.immutable.ImmutableSimpleProperties in project spring-boot by spring-projects.
the class ImmutablePropertiesMetadataGenerationTests method immutableSimpleProperties.
@Test
void immutableSimpleProperties() {
ConfigurationMetadata metadata = compile(ImmutableSimpleProperties.class);
assertThat(metadata).has(Metadata.withGroup("immutable").fromSource(ImmutableSimpleProperties.class));
assertThat(metadata).has(Metadata.withProperty("immutable.the-name", String.class).fromSource(ImmutableSimpleProperties.class).withDescription("The name of this simple properties.").withDefaultValue("boot"));
assertThat(metadata).has(Metadata.withProperty("immutable.flag", Boolean.class).withDefaultValue(false).fromSource(ImmutableSimpleProperties.class).withDescription("A simple flag.").withDeprecation(null, null));
assertThat(metadata).has(Metadata.withProperty("immutable.comparator"));
assertThat(metadata).has(Metadata.withProperty("immutable.counter"));
assertThat(metadata.getItems()).hasSize(5);
}
Aggregations