test(parser): add regression and cross-feature interaction tests
Regression test confirms already-spaced dot names are not double-spaced. Interaction test confirms // separator works with dot-compressed names. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit was merged in pull request #208.
This commit is contained in:
@@ -169,6 +169,19 @@ class PersonNameParserTest {
|
|||||||
.containsExactly("Dr.Fr.Zarncke");
|
.containsExactly("Dr.Fr.Zarncke");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void split_alreadySpacedDotName_noDoubleSpacing() {
|
||||||
|
PersonNameParser.SplitName result = PersonNameParser.split("Dr. Fr. Zarncke");
|
||||||
|
assertThat(result.firstName()).isEqualTo("Dr. Fr.");
|
||||||
|
assertThat(result.lastName()).isEqualTo("Zarncke");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void slashSeparator_combinedWithDotCompressed() {
|
||||||
|
assertThat(PersonNameParser.parseReceivers("E.Rockstroh//Dr.Fr.Zarncke"))
|
||||||
|
.containsExactly("E.Rockstroh", "Dr.Fr.Zarncke");
|
||||||
|
}
|
||||||
|
|
||||||
// --- parseReceivers — shared last name with full-name part ─────────────────
|
// --- parseReceivers — shared last name with full-name part ─────────────────
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user