Search in sources :

Example 1 with DescriptionProperties

use of org.springframework.boot.configurationsample.simple.DescriptionProperties in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessorTests method descriptionProperties.

@Test
void descriptionProperties() {
    ConfigurationMetadata metadata = compile(DescriptionProperties.class);
    assertThat(metadata).has(Metadata.withGroup("description").fromSource(DescriptionProperties.class));
    assertThat(metadata).has(Metadata.withProperty("description.simple", String.class).fromSource(DescriptionProperties.class).withDescription("A simple description."));
    assertThat(metadata).has(Metadata.withProperty("description.multi-line", String.class).fromSource(DescriptionProperties.class).withDescription("This is a lengthy description that spans across multiple lines to showcase that the line separators are cleaned automatically."));
}
Also used : DescriptionProperties(org.springframework.boot.configurationsample.simple.DescriptionProperties) ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 ConfigurationMetadata (org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata)1 DescriptionProperties (org.springframework.boot.configurationsample.simple.DescriptionProperties)1