test(event-subscriber): project zaak-created notifications into the read projection (refs #7)
Failing unit + acceptance tests for the Event Subscriber's NotificationProjector: a zaken/zaak/create notification yields one INGEDIEND projection row, duplicate deliveries collapse to one row, non-zaak/non-create notifications are ignored, and a rebuild repopulates the projection from the durable notification log (PRD §8.4). The projector is a no-op stub so the tests compile and fail on the assertions; the implementation follows in the green commit. The notification log doubles as the idempotency guard and rebuild source so a rebuild needs no OpenZaak access (§8.1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace EventSubscriber.Application;
|
||||
|
||||
/// <summary>
|
||||
/// A row of the rebuildable read projection (PRD §8.4). For the minimal slice it carries
|
||||
/// the zaak id and a status; <c>Bsn</c> and <c>NaamPlaceholder</c> are part of the schema but
|
||||
/// are deferred — the NRC notification does not carry them and the subscriber may not read
|
||||
/// OpenZaak directly (CLAUDE.md §8.1). Populating them is a follow-up (ADR-0008).
|
||||
/// </summary>
|
||||
public sealed record RegisterEntry(
|
||||
string Id,
|
||||
string Status,
|
||||
string? Bsn = null,
|
||||
string? NaamPlaceholder = null);
|
||||
|
||||
/// <summary>The projection statuses the walking skeleton knows about.</summary>
|
||||
public static class RegistrationStatus
|
||||
{
|
||||
/// <summary>A zaak has been created; the registration is submitted.</summary>
|
||||
public const string Ingediend = "INGEDIEND";
|
||||
}
|
||||
Reference in New Issue
Block a user