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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user