From 1fba877de9c617b6f68357f7dd50c3fc965bec2b Mon Sep 17 00:00:00 2001 From: Edwin van den Houdt Date: Thu, 4 Jun 2026 11:14:11 +0200 Subject: [PATCH] test(acl): BDD acceptance scenario for opening a zaak (refs #5) Introduce a Reqnroll.xUnit acceptance project under tests/acceptance/ and the first Gherkin scenario driving S-04: the ACL default-fills the ZGW-mandatory zaak fields (ADR-0003) from a domain registration payload. Red: the scenario is discovered but has no step bindings yet, so it fails with undefined steps. The green commit wires the bindings to AclService. Co-Authored-By: Claude Opus 4.8 --- .gitignore | 3 +++ register-referentie.slnx | 3 +++ tests/acceptance/Acceptance.csproj | 22 +++++++++++++++ .../acceptance/Features/EenZaakOpenen.feature | 27 +++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 tests/acceptance/Acceptance.csproj create mode 100644 tests/acceptance/Features/EenZaakOpenen.feature diff --git a/.gitignore b/.gitignore index 21f4674..91aea34 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ obj/ [Rr]elease/ *.user +# Reqnroll-generated test code (regenerated from *.feature on build) +*.feature.cs + # Test results / coverage [Tt]est[Rr]esults/ *.trx diff --git a/register-referentie.slnx b/register-referentie.slnx index bf80fac..fe5cf56 100644 --- a/register-referentie.slnx +++ b/register-referentie.slnx @@ -10,4 +10,7 @@ + + + diff --git a/tests/acceptance/Acceptance.csproj b/tests/acceptance/Acceptance.csproj new file mode 100644 index 0000000..a1f3232 --- /dev/null +++ b/tests/acceptance/Acceptance.csproj @@ -0,0 +1,22 @@ + + + + net10.0 + enable + enable + false + + + + + + + + + + + + + + + diff --git a/tests/acceptance/Features/EenZaakOpenen.feature b/tests/acceptance/Features/EenZaakOpenen.feature new file mode 100644 index 0000000..8b7e41c --- /dev/null +++ b/tests/acceptance/Features/EenZaakOpenen.feature @@ -0,0 +1,27 @@ +# language: en +# Drives S-04 (#5). The ACL is the only code that talks to ZGW (ADR-0001); it +# default-fills the ZGW-mandatory zaak fields the domain never sees (ADR-0003). +# Real-OpenZaak verification is a separate slice — this scenario exercises the +# use case against an in-memory stand-in for the Zaken API. +Feature: Een zaak openen vanuit een registratie + Als domein wil ik de ACL vragen een zaak te openen + zodat de ZGW-verplichte velden worden ingevuld zonder dat het domein ze kent. + + Scenario: De ACL vult de ZGW-verplichte velden default in + Given a domain registration for BSN "123456782" + And the ACL is configured with these defaults: + | field | value | + | bronorganisatie | 517439943 | + | verantwoordelijkeOrganisatie | 517439943 | + | vertrouwelijkheidaanduiding | openbaar | + | zaaktype | http://openzaak/catalogi/api/v1/zaaktypen/big | + And today is "2026-06-04" + When the domain asks the ACL to open a zaak + Then a zaak is created with these default-filled fields + | field | value | + | bronorganisatie | 517439943 | + | verantwoordelijkeOrganisatie | 517439943 | + | vertrouwelijkheidaanduiding | openbaar | + | zaaktype | http://openzaak/catalogi/api/v1/zaaktypen/big | + | startdatum | 2026-06-04 | + And the ACL returns the URL of the created zaak