feat(stamdata): extract policy-question text into Stamdata
CI / frontend (push) Failing after 1m21s
CI / storybook-a11y (push) Failing after 5m27s
CI / backend (push) Successful in 1m35s
CI / codeql (csharp) (push) Failing after 1m50s
CI / codeql (javascript-typescript) (push) Failing after 1m30s
CI / api-client-drift (push) Successful in 2m1s
CI / e2e (push) Failing after 3h14m48s
CI / frontend (push) Failing after 1m21s
CI / storybook-a11y (push) Failing after 5m27s
CI / backend (push) Successful in 1m35s
CI / codeql (csharp) (push) Failing after 1m50s
CI / codeql (javascript-typescript) (push) Failing after 1m30s
CI / api-client-drift (push) Successful in 2m1s
CI / e2e (push) Failing after 3h14m48s
Move the geldigheidsvragen wording out of DiplomaRules into Stamdata.PolicyQuestions (business-editable text, config-as-code); DiplomaRules keeps only the rule of which questions apply. Extend StamdataValidationTests (no blank id/wording, distinct ids in the manual set) and update ADR-0004. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -38,4 +38,21 @@ public class StamdataValidationTests
|
||||
Assert.NotEmpty(professions);
|
||||
Assert.Equal(professions.Count, professions.Distinct().Count());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Every_policy_question_has_an_id_and_wording()
|
||||
{
|
||||
Assert.All(PolicyQuestions.All, q =>
|
||||
{
|
||||
Assert.False(string.IsNullOrWhiteSpace(q.Id), "A policy question has a blank id.");
|
||||
Assert.False(string.IsNullOrWhiteSpace(q.Vraag), $"Policy question '{q.Id}' has blank wording.");
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Manual_question_set_has_distinct_ids() // no field is asked twice
|
||||
{
|
||||
var ids = PolicyQuestions.ManualSet.Select(q => q.Id).ToList();
|
||||
Assert.Equal(ids.Count, ids.Distinct().Count());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user