Chapter officers can merge a markdown note onto filtered students, teams, or events and save the recipe. Extra student-note columns are additional fields (any ## … fields heading) so they work as print tokens whether imported or typed by hand. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using Core.Printing;
|
|
|
|
namespace Tests.Printing;
|
|
|
|
[TestFixture]
|
|
public class PrintFieldCatalog_Tests
|
|
{
|
|
[Test]
|
|
public void BuiltInFor_StudentIncludesChapterAndStudentTokens()
|
|
{
|
|
var tokens = PrintFieldCatalog.BuiltInFor(PrintEntityType.Student);
|
|
|
|
Assert.That(tokens, Does.Contain("FirstName"));
|
|
Assert.That(tokens, Does.Contain("Chapter.ShortName"));
|
|
Assert.That(tokens, Does.Not.Contain("Interview Time"));
|
|
}
|
|
|
|
[Test]
|
|
public void BuiltInFor_TeamAndEventHaveExpectedNames()
|
|
{
|
|
Assert.That(PrintFieldCatalog.BuiltInFor(PrintEntityType.Team), Does.Contain("EventName"));
|
|
Assert.That(PrintFieldCatalog.BuiltInFor(PrintEntityType.Event), Does.Contain("RegionalEvent"));
|
|
}
|
|
|
|
[Test]
|
|
public void Layout_IncludesPageBreakAndAnswerSpace()
|
|
{
|
|
Assert.That(PrintFieldCatalog.Layout, Does.Contain(NoteTemplateMerger.PageBreakToken));
|
|
Assert.That(PrintFieldCatalog.Layout, Does.Contain(NoteTemplateMerger.AnswerSpaceToken));
|
|
}
|
|
|
|
[Test]
|
|
public void EntityTokens_MatchesCatalogArrays()
|
|
{
|
|
Assert.That(PrintFieldCatalog.EntityTokens(PrintEntityType.Student), Is.EqualTo(PrintFieldCatalog.Student));
|
|
Assert.That(PrintFieldCatalog.EntityTokens(PrintEntityType.Team), Is.EqualTo(PrintFieldCatalog.Team));
|
|
Assert.That(PrintFieldCatalog.EntityTokens(PrintEntityType.Event), Is.EqualTo(PrintFieldCatalog.Event));
|
|
}
|
|
}
|