test(bff): documents endpoint forwards the base64 file to the domain (refs #103)

RED: the self-service documents endpoint takes the base64 file (+ fileName/contentType)
as JSON — the portal encodes client-side — with the bsn from the token, and forwards
all of it to the domain. IDomainClient.ProvideDocumentsAsync grows accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
not
2026-07-20 12:07:42 +02:00
co-authored by Claude Opus 4.8
parent 3c344caa29
commit 9d327bbd81
2 changed files with 21 additions and 6 deletions
+3 -3
View File
@@ -94,15 +94,15 @@ internal sealed class FakeDomainClient : IDomainClient
return Task.FromResult(WithdrawSucceeds);
}
public (string RegistrationId, string Bsn)? DocumentsProvidedFor { get; private set; }
public (string RegistrationId, string Bsn, string ContentBase64, string? FileName, string? ContentType)? DocumentsProvidedFor { get; private set; }
/// <summary>Whether the fake domain reports the provide-documents as done (true → 204) or
/// not-found/not-owned (false → 404). Tests set this to exercise the relay.</summary>
public bool ProvideDocumentsSucceeds { get; set; } = true;
public Task<bool> ProvideDocumentsAsync(string registrationId, string bsn, CancellationToken ct = default)
public Task<bool> ProvideDocumentsAsync(string registrationId, string bsn, string contentBase64, string? fileName, string? contentType, CancellationToken ct = default)
{
DocumentsProvidedFor = (registrationId, bsn);
DocumentsProvidedFor = (registrationId, bsn, contentBase64, fileName, contentType);
return Task.FromResult(ProvideDocumentsSucceeds);
}