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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user