Formatting

pull/9259/head
Phillip Webb 8 years ago
parent 5e35cdccce
commit 74f411faed

@ -73,8 +73,8 @@ public class Deprecation implements Serializable {
@Override @Override
public String toString() { public String toString() {
return "Deprecation{" + "level='" + this.level + '\'' + ", reason='" return "Deprecation{" + "level='" + this.level + '\'' + ", reason='" + this.reason
+ this.reason + '\'' + ", replacement='" + this.replacement + '\'' + '}'; + '\'' + ", replacement='" + this.replacement + '\'' + '}';
} }
/** /**

@ -157,8 +157,7 @@ public class JsonReaderTests extends AbstractConfigurationMetadataTests {
.isEqualTo("Server namespace has moved to spring.server"); .isEqualTo("Server namespace has moved to spring.server");
assertThat(item.getDeprecation().getReplacement()) assertThat(item.getDeprecation().getReplacement())
.isEqualTo("server.spring.port"); .isEqualTo("server.spring.port");
assertThat(item.getDeprecation().getLevel()) assertThat(item.getDeprecation().getLevel()).isEqualTo(Deprecation.Level.WARNING);
.isEqualTo(Deprecation.Level.WARNING);
ConfigurationMetadataItem item2 = items.get(1); ConfigurationMetadataItem item2 = items.get(1);
assertProperty(item2, "server.cluster-name", "server.cluster-name", String.class, assertProperty(item2, "server.cluster-name", "server.cluster-name", String.class,
@ -166,8 +165,7 @@ public class JsonReaderTests extends AbstractConfigurationMetadataTests {
assertThat(item2.isDeprecated()).isTrue(); assertThat(item2.isDeprecated()).isTrue();
assertThat(item2.getDeprecation().getReason()).isNull(); assertThat(item2.getDeprecation().getReason()).isNull();
assertThat(item2.getDeprecation().getReplacement()).isNull(); assertThat(item2.getDeprecation().getReplacement()).isNull();
assertThat(item.getDeprecation().getLevel()) assertThat(item.getDeprecation().getLevel()).isEqualTo(Deprecation.Level.WARNING);
.isEqualTo(Deprecation.Level.WARNING);
ConfigurationMetadataItem item3 = items.get(2); ConfigurationMetadataItem item3 = items.get(2);
assertProperty(item3, "spring.server.name", "spring.server.name", String.class, assertProperty(item3, "spring.server.name", "spring.server.name", String.class,
@ -176,16 +174,17 @@ public class JsonReaderTests extends AbstractConfigurationMetadataTests {
assertThat(item3.getDeprecation()).isEqualTo(null); assertThat(item3.getDeprecation()).isEqualTo(null);
ConfigurationMetadataItem item4 = items.get(3); ConfigurationMetadataItem item4 = items.get(3);
assertProperty(item4, "spring.server-name", "spring.server-name", String.class, null); assertProperty(item4, "spring.server-name", "spring.server-name", String.class,
null);
assertThat(item4.isDeprecated()).isTrue(); assertThat(item4.isDeprecated()).isTrue();
assertThat(item4.getDeprecation().getReason()).isNull(); assertThat(item4.getDeprecation().getReason()).isNull();
assertThat(item4.getDeprecation().getReplacement()) assertThat(item4.getDeprecation().getReplacement())
.isEqualTo("spring.server.name"); .isEqualTo("spring.server.name");
assertThat(item4.getDeprecation().getLevel()) assertThat(item4.getDeprecation().getLevel()).isEqualTo(Deprecation.Level.ERROR);
.isEqualTo(Deprecation.Level.ERROR);
ConfigurationMetadataItem item5 = items.get(4); ConfigurationMetadataItem item5 = items.get(4);
assertProperty(item5, "spring.server-name2", "spring.server-name2", String.class, null); assertProperty(item5, "spring.server-name2", "spring.server-name2", String.class,
null);
assertThat(item5.isDeprecated()).isTrue(); assertThat(item5.isDeprecated()).isTrue();
assertThat(item5.getDeprecation().getReason()).isNull(); assertThat(item5.getDeprecation().getReason()).isNull();
assertThat(item5.getDeprecation().getReplacement()) assertThat(item5.getDeprecation().getReplacement())

Loading…
Cancel
Save