SentenceExtractorTests Class — spring-boot Architecture
Architecture documentation for the SentenceExtractorTests class in SentenceExtractorTests.java from the spring-boot codebase.
Entity Profile
Source Code
configuration-metadata/spring-boot-configuration-metadata/src/test/java/org/springframework/boot/configurationmetadata/SentenceExtractorTests.java lines 28–71
class SentenceExtractorTests {
private static final String NEW_LINE = System.lineSeparator();
private final SentenceExtractor extractor = new SentenceExtractor();
@Test
void extractFirstSentence() {
String sentence = this.extractor.getFirstSentence("My short description. More stuff.");
assertThat(sentence).isEqualTo("My short description.");
}
@Test
void extractFirstSentenceNewLineBeforeDot() {
String sentence = this.extractor
.getFirstSentence("My short" + NEW_LINE + "description." + NEW_LINE + "More stuff.");
assertThat(sentence).isEqualTo("My short description.");
}
@Test
void extractFirstSentenceNewLineBeforeDotWithSpaces() {
String sentence = this.extractor
.getFirstSentence("My short " + NEW_LINE + " description. " + NEW_LINE + "More stuff.");
assertThat(sentence).isEqualTo("My short description.");
}
@Test
void extractFirstSentenceNoDot() {
String sentence = this.extractor.getFirstSentence("My short description");
assertThat(sentence).isEqualTo("My short description");
}
@Test
void extractFirstSentenceNoDotMultipleLines() {
String sentence = this.extractor.getFirstSentence("My short description " + NEW_LINE + " More stuff");
assertThat(sentence).isEqualTo("My short description");
}
@Test
void extractFirstSentenceNull() {
assertThat(this.extractor.getFirstSentence(null)).isNull();
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free