Polish
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user