Search in sources :

Example 6 with ConfigurationMetadata

use of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessorTests method excludedTypesPojo.

@Test
public void excludedTypesPojo() throws IOException {
    ConfigurationMetadata metadata = compile(ExcludedTypesPojo.class);
    assertThat(metadata).has(Metadata.withProperty("excluded.name"));
    assertThat(metadata).isNotEqualTo(Metadata.withProperty("excluded.class-loader"));
    assertThat(metadata).isNotEqualTo(Metadata.withProperty("excluded.data-source"));
    assertThat(metadata).isNotEqualTo(Metadata.withProperty("excluded.print-writer"));
    assertThat(metadata).isNotEqualTo(Metadata.withProperty("excluded.writer"));
    assertThat(metadata).isNotEqualTo(Metadata.withProperty("excluded.writer-array"));
}
Also used : ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.Test)

Example 7 with ConfigurationMetadata

use of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessorTests method invalidMethodConfig.

@Test
public void invalidMethodConfig() throws Exception {
    ConfigurationMetadata metadata = compile(InvalidMethodConfig.class);
    assertThat(metadata).has(Metadata.withProperty("something.name", String.class).fromSource(InvalidMethodConfig.class));
    assertThat(metadata).isNotEqualTo(Metadata.withProperty("invalid.name"));
}
Also used : InvalidMethodConfig(org.springframework.boot.configurationsample.method.InvalidMethodConfig) ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.Test)

Example 8 with ConfigurationMetadata

use of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessorTests method innerClassAnnotatedGetterConfig.

@Test
public void innerClassAnnotatedGetterConfig() throws Exception {
    ConfigurationMetadata metadata = compile(InnerClassAnnotatedGetterConfig.class);
    assertThat(metadata).has(Metadata.withProperty("specific.value"));
    assertThat(metadata).has(Metadata.withProperty("foo.name"));
    assertThat(metadata).isNotEqualTo(Metadata.withProperty("specific.foo"));
}
Also used : ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.Test)

Example 9 with ConfigurationMetadata

use of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessorTests method builderPojo.

@Test
public void builderPojo() throws IOException {
    ConfigurationMetadata metadata = compile(BuilderPojo.class);
    assertThat(metadata).has(Metadata.withProperty("builder.name"));
}
Also used : ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.Test)

Example 10 with ConfigurationMetadata

use of org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata in project spring-boot by spring-projects.

the class ConfigurationMetadataAnnotationProcessorTests method lombokDataProperties.

@Test
public void lombokDataProperties() throws Exception {
    ConfigurationMetadata metadata = compile(LombokSimpleDataProperties.class);
    assertSimpleLombokProperties(metadata, LombokSimpleDataProperties.class, "data");
}
Also used : ConfigurationMetadata(org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata) Test(org.junit.Test)

Aggregations

ConfigurationMetadata (org.springframework.boot.configurationprocessor.metadata.ConfigurationMetadata)44 Test (org.junit.Test)42 ItemMetadata (org.springframework.boot.configurationprocessor.metadata.ItemMetadata)5 ItemDeprecation (org.springframework.boot.configurationprocessor.metadata.ItemDeprecation)3 BarProperties (org.springframework.boot.configurationsample.incremental.BarProperties)3 RenamedBarProperties (org.springframework.boot.configurationsample.incremental.RenamedBarProperties)3 JSONObject (org.json.JSONObject)2 FooProperties (org.springframework.boot.configurationsample.incremental.FooProperties)2 LombokInnerClassProperties (org.springframework.boot.configurationsample.lombok.LombokInnerClassProperties)2 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 FileWriter (java.io.FileWriter)1 JSONArray (org.json.JSONArray)1 InvalidConfigurationMetadataException (org.springframework.boot.configurationprocessor.metadata.InvalidConfigurationMetadataException)1 ItemHint (org.springframework.boot.configurationprocessor.metadata.ItemHint)1 LombokSimpleProperties (org.springframework.boot.configurationsample.lombok.LombokSimpleProperties)1 DeprecatedMethodConfig (org.springframework.boot.configurationsample.method.DeprecatedMethodConfig)1 InvalidMethodConfig (org.springframework.boot.configurationsample.method.InvalidMethodConfig)1 MethodAndClassConfig (org.springframework.boot.configurationsample.method.MethodAndClassConfig)1 SimpleMethodConfig (org.springframework.boot.configurationsample.method.SimpleMethodConfig)1