|
|
@ -490,8 +490,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
|
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void lombokInnerClassWithGetterProperties() throws IOException {
|
|
|
|
public void lombokInnerClassWithGetterProperties() throws IOException {
|
|
|
|
ConfigurationMetadata metadata =
|
|
|
|
ConfigurationMetadata metadata = compile(
|
|
|
|
compile(LombokInnerClassWithGetterProperties.class);
|
|
|
|
LombokInnerClassWithGetterProperties.class);
|
|
|
|
assertThat(metadata).has(Metadata.withGroup("config")
|
|
|
|
assertThat(metadata).has(Metadata.withGroup("config")
|
|
|
|
.fromSource(LombokInnerClassWithGetterProperties.class));
|
|
|
|
.fromSource(LombokInnerClassWithGetterProperties.class));
|
|
|
|
assertThat(metadata).has(Metadata.withGroup("config.first")
|
|
|
|
assertThat(metadata).has(Metadata.withGroup("config.first")
|
|
|
@ -541,16 +541,14 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void mergeExistingPropertyDeprecation() throws Exception {
|
|
|
|
public void mergeExistingPropertyDeprecation() throws Exception {
|
|
|
|
ItemMetadata property = ItemMetadata.newProperty("simple", "comparator", null,
|
|
|
|
ItemMetadata property = ItemMetadata.newProperty("simple", "comparator", null,
|
|
|
|
null, null, null, null,
|
|
|
|
null, null, null, null, new ItemDeprecation("Don't use this.",
|
|
|
|
new ItemDeprecation("Don't use this.", "simple.complex-comparator",
|
|
|
|
"simple.complex-comparator", "error"));
|
|
|
|
"error"));
|
|
|
|
|
|
|
|
writeAdditionalMetadata(property);
|
|
|
|
writeAdditionalMetadata(property);
|
|
|
|
ConfigurationMetadata metadata = compile(SimpleProperties.class);
|
|
|
|
ConfigurationMetadata metadata = compile(SimpleProperties.class);
|
|
|
|
assertThat(metadata)
|
|
|
|
assertThat(metadata)
|
|
|
|
.has(Metadata.withProperty("simple.comparator", "java.util.Comparator<?>")
|
|
|
|
.has(Metadata.withProperty("simple.comparator", "java.util.Comparator<?>")
|
|
|
|
.fromSource(SimpleProperties.class)
|
|
|
|
.fromSource(SimpleProperties.class).withDeprecation(
|
|
|
|
.withDeprecation("Don't use this.", "simple.complex-comparator",
|
|
|
|
"Don't use this.", "simple.complex-comparator", "error"));
|
|
|
|
"error"));
|
|
|
|
|
|
|
|
assertThat(metadata.getItems()).hasSize(4);
|
|
|
|
assertThat(metadata.getItems()).hasSize(4);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -576,8 +574,8 @@ public class ConfigurationMetadataAnnotationProcessorTests {
|
|
|
|
ConfigurationMetadata metadata = compile(DeprecatedSingleProperty.class);
|
|
|
|
ConfigurationMetadata metadata = compile(DeprecatedSingleProperty.class);
|
|
|
|
assertThat(metadata).has(
|
|
|
|
assertThat(metadata).has(
|
|
|
|
Metadata.withProperty("singledeprecated.name", String.class.getName())
|
|
|
|
Metadata.withProperty("singledeprecated.name", String.class.getName())
|
|
|
|
.fromSource(DeprecatedSingleProperty.class)
|
|
|
|
.fromSource(DeprecatedSingleProperty.class).withDeprecation(
|
|
|
|
.withDeprecation("renamed", "singledeprecated.new-name", "error"));
|
|
|
|
"renamed", "singledeprecated.new-name", "error"));
|
|
|
|
assertThat(metadata.getItems()).hasSize(3);
|
|
|
|
assertThat(metadata.getItems()).hasSize(3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|