test(acl): list published zaaktypen for the beheer catalogus viewer (refs #130)
This commit is contained in:
@@ -65,6 +65,14 @@ public class AclServiceTests
|
||||
ResolvedByOmschrijving = omschrijving;
|
||||
return Task.FromResult(ResolvedInformatieobjecttype);
|
||||
}
|
||||
|
||||
public IReadOnlyList<ZaaktypeSummary> Zaaktypen { get; } =
|
||||
[
|
||||
new("BIG-REGISTRATIE", "BIG-registratie", new Uri("http://openzaak/catalogi/api/v1/zaaktypen/big")),
|
||||
];
|
||||
|
||||
public Task<IReadOnlyList<ZaaktypeSummary>> ListZaaktypenAsync(CancellationToken ct = default) =>
|
||||
Task.FromResult(Zaaktypen);
|
||||
}
|
||||
|
||||
private static AclDefaults Defaults() => new()
|
||||
@@ -225,4 +233,18 @@ public class AclServiceTests
|
||||
await Assert.ThrowsAsync<ArgumentNullException>(() => service.GetZaakReferenceAsync(null!));
|
||||
Assert.Null(gateway.ReadReferenceFor);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Listing_zaaktypen_returns_the_gateways_published_zaaktypen(/* S-15a */)
|
||||
{
|
||||
var gateway = new FakeGateway();
|
||||
var service = ServiceWith(gateway, Defaults(), new DateOnly(2026, 6, 4));
|
||||
|
||||
var zaaktypen = await service.ListZaaktypenAsync();
|
||||
|
||||
var only = Assert.Single(zaaktypen);
|
||||
Assert.Equal("BIG-REGISTRATIE", only.Identificatie);
|
||||
Assert.Equal("BIG-registratie", only.Omschrijving);
|
||||
Assert.Equal(new Uri("http://openzaak/catalogi/api/v1/zaaktypen/big"), only.Url);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class ZaaktypeCatalogTests
|
||||
public Task SetZaakToCancellationStatusAsync(Uri z, Uri zt, DateOnly d, CancellationToken ct = default) => throw new NotSupportedException();
|
||||
public Task<string> GetZaakIdentificatieAsync(Uri z, CancellationToken ct = default) => throw new NotSupportedException();
|
||||
public Task<Uri> StoreDocumentAsync(DocumentRequest r, CancellationToken ct = default) => throw new NotSupportedException();
|
||||
public Task<IReadOnlyList<ZaaktypeSummary>> ListZaaktypenAsync(CancellationToken ct = default) => throw new NotSupportedException();
|
||||
}
|
||||
|
||||
private static AclDefaults Defaults() => new()
|
||||
|
||||
Reference in New Issue
Block a user