fix(acceptance): implement the resolve API in the in-memory ZGW gateway (refs #113)
CI / frontend (pull_request) Successful in 2m35s
CI / lint (pull_request) Successful in 1m20s
CI / build (pull_request) Successful in 1m1s
CI / unit (pull_request) Successful in 1m10s
CI / mutation (pull_request) Successful in 5m50s
CI / verify-stack (pull_request) Successful in 8m17s
CI / frontend (pull_request) Successful in 2m35s
CI / lint (pull_request) Successful in 1m20s
CI / build (pull_request) Successful in 1m1s
CI / unit (pull_request) Successful in 1m10s
CI / mutation (pull_request) Successful in 5m50s
CI / verify-stack (pull_request) Successful in 8m17s
The acceptance InMemoryZaakGateway now implements IZaakGateway's new
Resolve{Zaaktype,Informatieobjecttype}UrlAsync, and the "een zaak openen" step
configures the ACL by identificatie + points the fake's resolved zaaktype at the
scenario URL — the Release build (which compiles tests/acceptance) failed without
this. All 17 acceptance + 54 ACL unit tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,9 +29,12 @@ public sealed class EenZaakOpenenSteps
|
|||||||
Bronorganisatie = values["bronorganisatie"],
|
Bronorganisatie = values["bronorganisatie"],
|
||||||
VerantwoordelijkeOrganisatie = values["verantwoordelijkeOrganisatie"],
|
VerantwoordelijkeOrganisatie = values["verantwoordelijkeOrganisatie"],
|
||||||
Vertrouwelijkheidaanduiding = values["vertrouwelijkheidaanduiding"],
|
Vertrouwelijkheidaanduiding = values["vertrouwelijkheidaanduiding"],
|
||||||
ZaaktypeUrl = new Uri(values["zaaktype"]),
|
ZaaktypeIdentificatie = "BIG-REGISTRATIE",
|
||||||
InformatieobjecttypeUrl = new Uri("http://openzaak/catalogi/api/v1/informatieobjecttypen/dip"),
|
InformatieobjecttypeOmschrijving = "Diploma",
|
||||||
};
|
};
|
||||||
|
// The ACL resolves the zaaktype by identificatie (S-27); the scenario's zaaktype URL is what
|
||||||
|
// the catalogus resolves it to, so the created zaak still carries that URL.
|
||||||
|
_gateway.ResolvedZaaktypeUrl = new Uri(values["zaaktype"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Given("today is \"(.*)\"")]
|
[Given("today is \"(.*)\"")]
|
||||||
@@ -41,7 +44,7 @@ public sealed class EenZaakOpenenSteps
|
|||||||
[When("the domain asks the ACL to open a zaak")]
|
[When("the domain asks the ACL to open a zaak")]
|
||||||
public async Task WhenTheDomainAsksTheAclToOpenAZaak()
|
public async Task WhenTheDomainAsksTheAclToOpenAZaak()
|
||||||
{
|
{
|
||||||
var service = new AclService(_gateway, _defaults!, new FixedClock(_today));
|
var service = new AclService(_gateway, _defaults!, new CachedZaaktypeCatalog(_gateway, _defaults!), new FixedClock(_today));
|
||||||
_returnedUrl = await service.OpenZaakAsync(_registration!);
|
_returnedUrl = await service.OpenZaakAsync(_registration!);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,11 @@ public sealed class InMemoryZaakGateway : IZaakGateway
|
|||||||
public (Uri Zaak, Uri Zaaktype, DateOnly Datum)? Approved { get; private set; }
|
public (Uri Zaak, Uri Zaaktype, DateOnly Datum)? Approved { get; private set; }
|
||||||
public (Uri Zaak, Uri Zaaktype, DateOnly Datum)? Cancelled { get; private set; }
|
public (Uri Zaak, Uri Zaaktype, DateOnly Datum)? Cancelled { get; private set; }
|
||||||
|
|
||||||
|
// The URLs the catalogus resolves the configured identificatie/omschrijving to (S-27); settable so
|
||||||
|
// a scenario can pin the zaaktype the ACL should default-fill.
|
||||||
|
public Uri ResolvedZaaktypeUrl { get; set; } = new("http://openzaak/catalogi/api/v1/zaaktypen/big");
|
||||||
|
public Uri ResolvedInformatieobjecttypeUrl { get; set; } = new("http://openzaak/catalogi/api/v1/informatieobjecttypen/dip");
|
||||||
|
|
||||||
public Task<Uri> OpenZaakAsync(ZaakRequest request, CancellationToken ct = default)
|
public Task<Uri> OpenZaakAsync(ZaakRequest request, CancellationToken ct = default)
|
||||||
{
|
{
|
||||||
Captured = request;
|
Captured = request;
|
||||||
@@ -37,4 +42,10 @@ public sealed class InMemoryZaakGateway : IZaakGateway
|
|||||||
|
|
||||||
public Task<Uri> StoreDocumentAsync(DocumentRequest request, CancellationToken ct = default)
|
public Task<Uri> StoreDocumentAsync(DocumentRequest request, CancellationToken ct = default)
|
||||||
=> Task.FromResult(new Uri("http://openzaak/documenten/api/v1/enkelvoudiginformatieobjecten/acc-doc"));
|
=> Task.FromResult(new Uri("http://openzaak/documenten/api/v1/enkelvoudiginformatieobjecten/acc-doc"));
|
||||||
|
|
||||||
|
public Task<Uri> ResolveZaaktypeUrlAsync(string identificatie, CancellationToken ct = default)
|
||||||
|
=> Task.FromResult(ResolvedZaaktypeUrl);
|
||||||
|
|
||||||
|
public Task<Uri> ResolveInformatieobjecttypeUrlAsync(string omschrijving, CancellationToken ct = default)
|
||||||
|
=> Task.FromResult(ResolvedInformatieobjecttypeUrl);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user