This commit is contained in:
Phillip Webb
2018-01-18 23:10:28 -08:00
parent 6d93573db0
commit f3379668ac
51 changed files with 139 additions and 158 deletions

View File

@@ -27,6 +27,8 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
public class DescriptionExtractorTests {
private static final String NEW_LINE = System.lineSeparator();
private DescriptionExtractor extractor = new DescriptionExtractor();
@Test
@@ -39,16 +41,14 @@ public class DescriptionExtractorTests {
@Test
public void extractShortDescriptionNewLineBeforeDot() {
String description = this.extractor.getShortDescription(
"My short" + System.lineSeparator() + "description."
+ System.lineSeparator() + "More stuff.");
"My short" + NEW_LINE + "description." + NEW_LINE + "More stuff.");
assertThat(description).isEqualTo("My short description.");
}
@Test
public void extractShortDescriptionNewLineBeforeDotWithSpaces() {
String description = this.extractor.getShortDescription(
"My short " + System.lineSeparator() + " description. "
+ System.lineSeparator() + "More stuff.");
"My short " + NEW_LINE + " description. " + NEW_LINE + "More stuff.");
assertThat(description).isEqualTo("My short description.");
}
@@ -61,8 +61,7 @@ public class DescriptionExtractorTests {
@Test
public void extractShortDescriptionNoDotMultipleLines() {
String description = this.extractor
.getShortDescription("My short description " + System.lineSeparator()
+ " More stuff");
.getShortDescription("My short description " + NEW_LINE + " More stuff");
assertThat(description).isEqualTo("My short description");
}

View File

@@ -21,8 +21,8 @@ import javax.validation.constraints.NotEmpty;
import org.springframework.boot.configurationsample.ConfigurationProperties;
/**
* An annotated getter with {@code NotEmpty} that triggers a different class type
* in the compiler. See #11512
* An annotated getter with {@code NotEmpty} that triggers a different class type in the
* compiler. See #11512
*
* @author Stephane Nicoll
*/

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.