feat(workflow): emit diplomaOrigin start variable + accept it on submit (S-13, refs #14)

The Workflow Client now posts diplomaOrigin alongside registrationId when starting
the process, and the domain submit endpoint accepts an optional diplomaOrigin
(defaulting to domestic) so a foreign submission can be driven end-to-end. Adds the
aggregate + submit-forwarding tests now that the plumbing is in place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-17 11:55:45 +02:00
parent 1969297c97
commit 6955e0ff98
4 changed files with 34 additions and 3 deletions

View File

@@ -25,6 +25,19 @@ public class SubmitRegistrationTests
Assert.Equal(2, store.SaveCount);
}
[Fact]
public async Task Submitting_a_foreign_diploma_carries_its_origin_to_the_process()
{
var store = new FakeRegistrationStore();
var workflow = new FakeWorkflowClient();
var handler = new SubmitRegistration(store, workflow);
var id = await handler.HandleAsync(new SubmitRegistrationCommand("123456782", DiplomaOrigin.Buitenlands));
Assert.Equal(DiplomaOrigin.Buitenlands, (await store.GetAsync(id))!.DiplomaOrigin);
Assert.Equal(DiplomaOrigin.Buitenlands, workflow.StartedWithOrigin);
}
[Fact]
public async Task Rejects_a_null_command_without_touching_the_store_or_workflow()
{