refactor: rename Application → Aanvraag across the wire (Step 1/8)
The wire said Application, the domain said Aanvraag — one aggregate with two names at every hop. Rename the backend DTOs and the /applications route to /aanvragen, regenerate the typed client, and rename the frontend adapter/store to match. Renamed: ApplicationSummaryDto/DetailDto, CreateApplicationRequest, SubmitApplicationRequest/Response → Aanvraag* equivalents; ApplicationsAdapter/Store → AanvragenAdapter/Store; applications.adapter.ts/applications.store.ts → aanvragen.*. Left untouched: the admin Case/Zaak vocabulary (/admin/cases, AdminCasesStore) — a separate read model, not part of this rename; the internal BigRegister.Domain.Applications namespace and the Applications EF table (renaming those needs a new EF migration, out of scope here). Part of the dashboard-readability refactor (see the approved plan). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,11 +18,11 @@ public class WerkvoorraadTests(TestWebApplicationFactory factory) : IClassFixtur
|
||||
return req;
|
||||
}
|
||||
|
||||
private async Task<ApplicationDetailDto> CreateAndSubmitHerregistratie()
|
||||
private async Task<AanvraagDetailDto> CreateAndSubmitHerregistratie()
|
||||
{
|
||||
var created = await _client.PostAsJsonAsync("/api/v1/applications", new { type = "herregistratie" });
|
||||
var a = (await created.Content.ReadFromJsonAsync<ApplicationDetailDto>())!;
|
||||
(await _client.PostAsJsonAsync($"/api/v1/applications/{a.Id}/submit", new { uren = 200 }))
|
||||
var created = await _client.PostAsJsonAsync("/api/v1/aanvragen", new { type = "herregistratie" });
|
||||
var a = (await created.Content.ReadFromJsonAsync<AanvraagDetailDto>())!;
|
||||
(await _client.PostAsJsonAsync($"/api/v1/aanvragen/{a.Id}/submit", new { uren = 200 }))
|
||||
.EnsureSuccessStatusCode();
|
||||
return a;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ public class WerkvoorraadTests(TestWebApplicationFactory factory) : IClassFixtur
|
||||
{
|
||||
var res = await _client.SendAsync(AsBehandelaar("/api/v1/werkvoorraad"));
|
||||
res.EnsureSuccessStatusCode();
|
||||
var queue = (await res.Content.ReadFromJsonAsync<List<ApplicationSummaryDto>>())!;
|
||||
var queue = (await res.Content.ReadFromJsonAsync<List<AanvraagSummaryDto>>())!;
|
||||
var mine = queue.Single(x => x.Id == a.Id);
|
||||
Assert.Equal("InBehandeling", mine.Status.Tag);
|
||||
// RB-03/BIO-003: masked, like /admin/cases — both inherit ToAdminSummaryDto.
|
||||
@@ -53,18 +53,18 @@ public class WerkvoorraadTests(TestWebApplicationFactory factory) : IClassFixtur
|
||||
[Fact]
|
||||
public async Task Queue_excludes_concepts()
|
||||
{
|
||||
var created = await _client.PostAsJsonAsync("/api/v1/applications", new { type = "herregistratie" });
|
||||
var a = (await created.Content.ReadFromJsonAsync<ApplicationDetailDto>())!;
|
||||
var created = await _client.PostAsJsonAsync("/api/v1/aanvragen", new { type = "herregistratie" });
|
||||
var a = (await created.Content.ReadFromJsonAsync<AanvraagDetailDto>())!;
|
||||
try
|
||||
{
|
||||
var res = await _client.SendAsync(AsBehandelaar("/api/v1/werkvoorraad"));
|
||||
res.EnsureSuccessStatusCode();
|
||||
var queue = (await res.Content.ReadFromJsonAsync<List<ApplicationSummaryDto>>())!;
|
||||
var queue = (await res.Content.ReadFromJsonAsync<List<AanvraagSummaryDto>>())!;
|
||||
Assert.DoesNotContain(queue, x => x.Id == a.Id);
|
||||
}
|
||||
finally
|
||||
{
|
||||
await _client.DeleteAsync($"/api/v1/applications/{a.Id}");
|
||||
await _client.DeleteAsync($"/api/v1/aanvragen/{a.Id}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user