Search in sources :

Example 1 with MethodAndClassConfig

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

the class ConfigurationMetadataAnnotationProcessorTests method methodAndClassConfig.

@Test
public void methodAndClassConfig() throws Exception {
    ConfigurationMetadata metadata = compile(MethodAndClassConfig.class);
    assertThat(metadata).has(Metadata.withProperty("conflict.name", String.class).fromSource(MethodAndClassConfig.Foo.class));
    assertThat(metadata).has(Metadata.withProperty("conflict.flag", Boolean.class).fromSource(MethodAndClassConfig.Foo.class));
    assertThat(metadata).has(Metadata.withProperty("conflict.value", String.class).fromSource(MethodAndClassConfig.class));
}
Also used : MethodAndClassConfig(org.springframework.boot.configurationsample.method.MethodAndClassConfig) 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 MethodAndClassConfig (org.springframework.boot.configurationsample.method.MethodAndClassConfig)1