feat(domain): withdrawal cancels the registratie process (S-11b, refs #12) #89
@@ -50,8 +50,10 @@ public sealed class InMemoryUserTaskClient : IUserTaskClient
|
||||
private readonly List<BeoordelingTask> _open = [];
|
||||
|
||||
public (string TaskId, BeoordelingsBesluit Besluit)? Completed { get; private set; }
|
||||
public string? WithdrawnExecutionId { get; private set; }
|
||||
|
||||
public void Open(RegistrationId registrationId) => _open.Add(new BeoordelingTask($"task-{registrationId}", registrationId));
|
||||
public void Open(RegistrationId registrationId) =>
|
||||
_open.Add(new BeoordelingTask($"task-{registrationId}", $"exec-{registrationId}", registrationId));
|
||||
|
||||
public Task<IReadOnlyList<BeoordelingTask>> GetOpenBeoordelingenAsync(CancellationToken ct = default)
|
||||
=> Task.FromResult<IReadOnlyList<BeoordelingTask>>(_open);
|
||||
@@ -64,6 +66,13 @@ public sealed class InMemoryUserTaskClient : IUserTaskClient
|
||||
_open.RemoveAll(t => t.TaskId == taskId);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public Task WithdrawBeoordelingAsync(string executionId, CancellationToken ct = default)
|
||||
{
|
||||
WithdrawnExecutionId = executionId;
|
||||
_open.RemoveAll(t => t.ExecutionId == executionId);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>An in-memory registration store for the domain acceptance scenario.</summary>
|
||||
|
||||
Reference in New Issue
Block a user