test(domain): Workflow Client, ACL client, store and job processor (refs #6)
Failing infrastructure unit tests (stub HttpMessageHandler, fakes): - FlowableWorkflowClient starts a process with the registrationId variable and returns the instance id; acquires OpenZaakAanmaken jobs (topic/workerId/lock) and parses their registrationId; completes a job with the zaakUrl variable — request URIs match flowable-rest's service/ and external-job-api/ paths. - AclHttpClient POSTs the bsn to the ACL and returns the zaak URL. - InMemoryRegistrationStore saves/reads/upserts by id. - OpenZaakJobProcessor acquires, opens a zaak, completes the job; leaves a failing job uncompleted for redelivery; polls harmlessly when idle. Adapters are stubs so the tests compile and fail on their assertions; the green commit implements them against the REST contract verified on a live Flowable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ public class OpenZaakWorkerTests
|
||||
public async Task Handling_a_job_opens_a_zaak_via_the_acl_and_attaches_it()
|
||||
{
|
||||
var registration = Submitted();
|
||||
var store = new InMemoryRegistrationStore();
|
||||
var store = new FakeRegistrationStore();
|
||||
store.Seed(registration);
|
||||
var acl = new FakeAclClient();
|
||||
var worker = new OpenZaakWorker(store, acl);
|
||||
@@ -32,7 +32,7 @@ public class OpenZaakWorkerTests
|
||||
[Fact]
|
||||
public async Task Handling_a_job_for_an_unknown_registration_throws_and_opens_no_zaak()
|
||||
{
|
||||
var store = new InMemoryRegistrationStore();
|
||||
var store = new FakeRegistrationStore();
|
||||
var acl = new FakeAclClient();
|
||||
var worker = new OpenZaakWorker(store, acl);
|
||||
|
||||
@@ -45,7 +45,7 @@ public class OpenZaakWorkerTests
|
||||
public async Task Handling_a_redelivered_job_is_idempotent_and_does_not_open_a_second_zaak()
|
||||
{
|
||||
var registration = Submitted();
|
||||
var store = new InMemoryRegistrationStore();
|
||||
var store = new FakeRegistrationStore();
|
||||
store.Seed(registration);
|
||||
var acl = new FakeAclClient();
|
||||
var worker = new OpenZaakWorker(store, acl);
|
||||
|
||||
Reference in New Issue
Block a user