test(domain): store finds inscriptions due for a herregistratie reminder (refs #18)

New IRegistrationStore.FindDueForHerregistratieReminderAsync — the sweep's
candidate set. The production store is stubbed to an empty list so the new test
fails; the green commit filters on the aggregate's own reminder-due rule.

refs #18
This commit is contained in:
not
2026-07-23 11:52:58 +02:00
parent 22215865b3
commit 3b3a44b177
4 changed files with 39 additions and 0 deletions
+5
View File
@@ -26,6 +26,11 @@ internal sealed class FakeRegistrationStore : IRegistrationStore
=> Task.FromResult(_byId.Values.FirstOrDefault(r =>
r.Bsn == bsn && r.Status is RegistrationStatus.Ingediend or RegistrationStatus.InBehandeling));
public Task<IReadOnlyList<Registration>> FindDueForHerregistratieReminderAsync(
DateTimeOffset asOf, CancellationToken ct = default)
=> Task.FromResult<IReadOnlyList<Registration>>(
_byId.Values.Where(r => r.HerregistratieReminderDue(asOf)).ToList());
public void Seed(Registration registration) => _byId[registration.Id] = registration;
}