Add CARING examples and coverage
Some checks failed
CI / Build and Test (push) Has been cancelled
CI / Lint (push) Has been cancelled

This commit is contained in:
2026-05-17 06:05:18 +02:00
parent 49655e40e0
commit 18054bd160
10 changed files with 318 additions and 1 deletions

View File

@@ -82,6 +82,15 @@ func TestDecisionAndAuditExamplesParse(t *testing.T) {
if audit.DecisionID != decision.ID {
t.Errorf("Audit.DecisionID = %q; want %q", audit.DecisionID, decision.ID)
}
var exposure api.CaringExposureEvent
loadJSON(t, filepath.Join("..", "..", "examples", "caring", "exposure_event.json"), &exposure)
if exposure.Type != api.ExposureEventSupport {
t.Errorf("Exposure.Type = %q; want X-Support", exposure.Type)
}
if len(exposure.ExposureModes) != 1 || exposure.ExposureModes[0] != api.ExposureModeMasked {
t.Errorf("Exposure.ExposureModes = %v; want [Masked]", exposure.ExposureModes)
}
}
func TestSchemaFilesAreJSON(t *testing.T) {