test(domain): herregistratie inscription date + reminder-due rule (refs #18)
The Registration aggregate gains the herregistratie clock: Approve now records the inscription moment, from which the herregistratie deadline and a reminder-due rule are derived. Members are stubbed so the suite compiles and the new assertions fail; the green commit implements them. Approve's signature gains the inscription moment (callers now supply 'now' from an injected TimeProvider). refs #18
This commit is contained in:
@@ -19,7 +19,7 @@ public class ApproveRegistrationTests
|
||||
var acl = new FakeAclClient();
|
||||
var registration = WithZaak();
|
||||
store.Seed(registration);
|
||||
var handler = new ApproveRegistration(store, acl);
|
||||
var handler = new ApproveRegistration(store, acl, TimeProvider.System);
|
||||
|
||||
await handler.HandleAsync(new ApproveRegistrationCommand(registration.Id));
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ApproveRegistrationTests
|
||||
{
|
||||
var store = new FakeRegistrationStore();
|
||||
var acl = new FakeAclClient();
|
||||
var handler = new ApproveRegistration(store, acl);
|
||||
var handler = new ApproveRegistration(store, acl, TimeProvider.System);
|
||||
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => handler.HandleAsync(null!));
|
||||
Assert.Equal(0, acl.ApproveCallCount);
|
||||
@@ -47,7 +47,7 @@ public class ApproveRegistrationTests
|
||||
{
|
||||
var store = new FakeRegistrationStore();
|
||||
var acl = new FakeAclClient();
|
||||
var handler = new ApproveRegistration(store, acl);
|
||||
var handler = new ApproveRegistration(store, acl, TimeProvider.System);
|
||||
|
||||
var ex = await Assert.ThrowsAsync<InvalidOperationException>(
|
||||
() => handler.HandleAsync(new ApproveRegistrationCommand(RegistrationId.New())));
|
||||
@@ -62,7 +62,7 @@ public class ApproveRegistrationTests
|
||||
var acl = new FakeAclClient();
|
||||
var registration = Registration.Submit("123456782"); // no zaak yet
|
||||
store.Seed(registration);
|
||||
var handler = new ApproveRegistration(store, acl);
|
||||
var handler = new ApproveRegistration(store, acl, TimeProvider.System);
|
||||
|
||||
var ex = await Assert.ThrowsAsync<InvalidOperationException>(
|
||||
() => handler.HandleAsync(new ApproveRegistrationCommand(registration.Id)));
|
||||
@@ -77,7 +77,7 @@ public class ApproveRegistrationTests
|
||||
var acl = new FakeAclClient();
|
||||
var registration = WithZaak();
|
||||
store.Seed(registration);
|
||||
var handler = new ApproveRegistration(store, acl);
|
||||
var handler = new ApproveRegistration(store, acl, TimeProvider.System);
|
||||
|
||||
await handler.HandleAsync(new ApproveRegistrationCommand(registration.Id));
|
||||
await handler.HandleAsync(new ApproveRegistrationCommand(registration.Id));
|
||||
|
||||
Reference in New Issue
Block a user