Merge branch '1.5.x'

This commit is contained in:
Andy Wilkinson
2017-06-16 09:13:42 +01:00
36 changed files with 109 additions and 111 deletions

View File

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