use of org.springframework.boot.configurationsample.method.DeprecatedMethodConfig in project spring-boot by spring-projects.
the class ConfigurationMetadataAnnotationProcessorTests method deprecatedMethodConfig.
@Test
public void deprecatedMethodConfig() throws Exception {
Class<DeprecatedMethodConfig> type = DeprecatedMethodConfig.class;
ConfigurationMetadata metadata = compile(type);
assertThat(metadata).has(Metadata.withGroup("foo").fromSource(type));
assertThat(metadata).has(Metadata.withProperty("foo.name", String.class).fromSource(DeprecatedMethodConfig.Foo.class).withDeprecation(null, null));
assertThat(metadata).has(Metadata.withProperty("foo.flag", Boolean.class).fromSource(DeprecatedMethodConfig.Foo.class).withDeprecation(null, null));
}
use of org.springframework.boot.configurationsample.method.DeprecatedMethodConfig in project spring-boot by spring-projects.
the class MethodBasedMetadataGenerationTests method deprecatedMethodConfig.
@Test
void deprecatedMethodConfig() {
Class<DeprecatedMethodConfig> type = DeprecatedMethodConfig.class;
ConfigurationMetadata metadata = compile(type);
assertThat(metadata).has(Metadata.withGroup("foo").fromSource(type));
assertThat(metadata).has(Metadata.withProperty("foo.name", String.class).fromSource(DeprecatedMethodConfig.Foo.class).withDeprecation(null, null));
assertThat(metadata).has(Metadata.withProperty("foo.flag", Boolean.class).withDefaultValue(false).fromSource(DeprecatedMethodConfig.Foo.class).withDeprecation(null, null));
}
Aggregations