summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2026-10-08 11:24:07 +0200
committerGitHub2026-10-08 11:24:07 +0200
commit845df5097dbc3e1e98a1d44dfdc08e0cf2995bb1 (patch)
treef82b5b9cdddaa7ecff2892cd3538efa9a70250a4
parent73dc4cef8d0ffc00d47cf07b49f1277141f692cf (diff)
test: ensure message and details are handled in data quality (#327)
QualityReport may contain `message` or `details`. Ensure both are handled equally.
-rw-r--r--src/test/kotlin/dev/dnpm/etl/processor/monitoring/ReportServiceTest.kt12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/kotlin/dev/dnpm/etl/processor/monitoring/ReportServiceTest.kt b/src/test/kotlin/dev/dnpm/etl/processor/monitoring/ReportServiceTest.kt
index 83c2354..d3faec4 100644
--- a/src/test/kotlin/dev/dnpm/etl/processor/monitoring/ReportServiceTest.kt
+++ b/src/test/kotlin/dev/dnpm/etl/processor/monitoring/ReportServiceTest.kt
@@ -53,4 +53,16 @@ class ReportServiceTest {
assertThat(actual[4].severity).isEqualTo(ReportService.Severity.WARNING)
assertThat(actual[5].severity).isEqualTo(ReportService.Severity.INFO)
}
+
+ @Test
+ fun shouldParseDataQualityReportMessageText() {
+ val dataQualityReport = """{"issues":[
+ {"severity":"error","details":"/histologyReports(0)/issuedOn: error.path.missing"},
+ {"severity":"error","message":"Ungültiger Code 'Nx'","path":"/Diagnose[1234]/Tumor-Staging/TNM/N-Code"}
+ ]}""".trimIndent()
+ val actual = service.deserialize(dataQualityReport)
+ assertThat(actual).hasSize(2)
+ assertThat(actual[0].getMessageText()).isEqualTo("/histologyReports(0)/issuedOn: error.path.missing")
+ assertThat(actual[1].getMessageText()).isEqualTo("Ungültiger Code 'Nx'")
+ }
}