Fix windows build

pull/3497/head
Stephane Nicoll 9 years ago
parent e52c190b05
commit 68d875bdc6

@ -20,13 +20,13 @@ import java.text.BreakIterator;
import java.util.Locale;
/**
* Utility to extract a descriptions.
* Utility to extract a description.
*
* @author Stephane Nicoll
*/
class DescriptionExtractor {
private static final String NEW_LINE = System.getProperty("line.separator");
static final String NEW_LINE = System.getProperty("line.separator");
public String getShortDescription(String description) {
if (description == null) {

@ -38,14 +38,17 @@ public class DescriptionExtractorTests {
@Test
public void extractShortDescriptionNewLineBeforeDot() {
assertEquals("My short description.",
this.extractor.getShortDescription("My short\ndescription.\nMore stuff."));
this.extractor.getShortDescription("My short" + DescriptionExtractor.NEW_LINE +
"description." + DescriptionExtractor.NEW_LINE + "More stuff."));
}
@Test
public void extractShortDescriptionNewLineBeforeDotWithSpaces() {
assertEquals("My short description.",
this.extractor
.getShortDescription("My short \n description. \nMore stuff."));
.getShortDescription("My short "
+ DescriptionExtractor.NEW_LINE + " description. "
+ DescriptionExtractor.NEW_LINE + "More stuff."));
}
@Test
@ -57,7 +60,8 @@ public class DescriptionExtractorTests {
@Test
public void extractShortDescriptionNoDotMultipleLines() {
assertEquals("My short description",
this.extractor.getShortDescription("My short description \n More stuff"));
this.extractor.getShortDescription("My short description "
+ DescriptionExtractor.NEW_LINE + " More stuff"));
}
@Test

Loading…
Cancel
Save