feat: import leftover student fields into notes and show them on the roster
Store leftover CSV columns on hidden student notes, move catalog import to /events/import, and persist Students index columns from Chapter Settings. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Core.Services;
|
||||
|
||||
namespace Tests.Services;
|
||||
|
||||
[TestFixture]
|
||||
public class NoteNamingService_Tests
|
||||
{
|
||||
private readonly NoteNamingService _service = new();
|
||||
|
||||
[Test]
|
||||
public void GetStudentNoteTitle_UsesStablePrefix()
|
||||
{
|
||||
Assert.That(_service.GetStudentNoteTitle(42), Is.EqualTo("#Student:42"));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void IsStudentNote_AndParseId()
|
||||
{
|
||||
Assert.That(_service.IsStudentNote("#Student:12"), Is.True);
|
||||
Assert.That(_service.IsStudentNote("#Students"), Is.False);
|
||||
Assert.That(_service.TryParseStudentNoteId("#Student:12", out var id), Is.True);
|
||||
Assert.That(id, Is.EqualTo(12));
|
||||
Assert.That(_service.TryParseStudentNoteId("#Event Ranking", out _), Is.False);
|
||||
Assert.That(_service.IsStudentNote(null), Is.False);
|
||||
Assert.That(_service.TryParseStudentNoteId("#Student:", out _), Is.False);
|
||||
Assert.That(_service.IsPageNote("#Student:12"), Is.True);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user