feat: add optional student nickname for informal display
Keep legal first and last names for formal lists; show DisplayFirstName on teams, calendars, and import matching so two Josiahs can be told apart. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,6 +17,22 @@ public class NoteTemplateMerger_Tests
|
||||
Assert.That(result, Is.EqualTo("Hello Aria Cole"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Merge_FirstNameStaysLegalWhenDisplayFirstNameIsNickname()
|
||||
{
|
||||
var tokens = PrintTokenMap.Create();
|
||||
tokens["FirstName"] = "Josiah";
|
||||
tokens["Nickname"] = "Jo";
|
||||
tokens["DisplayFirstName"] = "Jo";
|
||||
tokens["LastName"] = "Brown";
|
||||
|
||||
var result = NoteTemplateMerger.Merge(
|
||||
"{{FirstName}} {{LastName}} / {{DisplayFirstName}} ({{Nickname}})",
|
||||
tokens);
|
||||
|
||||
Assert.That(result, Is.EqualTo("Josiah Brown / Jo (Jo)"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Merge_SupportsDottedAndSpacedNames()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user