Search in sources :

Example 1 with SimpleMethodConfig

use of org.springframework.boot.configurationsample.method.SimpleMethodConfig in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessorTests method simpleMethodConfig.

@Test
public void simpleMethodConfig() throws Exception {
    ConfigurationMetadata metadata = compile(SimpleMethodConfig.class);
    assertThat(metadata).has(Metadata.withGroup("foo").fromSource(SimpleMethodConfig.class));
    assertThat(metadata).has(Metadata.withProperty("foo.name", String.class).fromSource(SimpleMethodConfig.Foo.class));
    assertThat(metadata).has(Metadata.withProperty("foo.flag", Boolean.class).fromSource(SimpleMethodConfig.Foo.class));
}
Also used : SimpleMethodConfig(org.springframework.boot.configurationsample.method.SimpleMethodConfig) ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ConfigurationMetadata (org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata)1 SimpleMethodConfig (org.springframework.boot.configurationsample.method.SimpleMethodConfig)1