Skip to content

Commit 5032009

Browse files
Cleaner
1 parent af99965 commit 5032009

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/diagnosticreport/DiagnosticReportMapperTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,14 @@ void When_DiagnosticReport_Has_SpecimenALinkedTestResultAndAnUnlinkedTestResult_
314314
final DiagnosticReport diagnosticReport = getDiagnosticReportResourceFromJson(diagnosticReportFileName);
315315
final Bundle bundle = getBundleResourceFromJson(INPUT_JSON_BUNDLE);
316316
final InputBundle inputBundle = new InputBundle(bundle);
317+
final String regexpUuid = "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}";
318+
final String expectObservation = "Observation/AD373CA7-3940-4249-85A2-D3A22E9F17C7";
317319

318320
when(messageContext.getInputBundleHolder()).thenReturn(inputBundle);
319321

320322
final String actualXml = mapper.mapDiagnosticReportToCompoundStatement(diagnosticReport);
321323

322-
assertThat(actualXml).matches("(?s).*<!-- Mapped Specimen with id: DUMMY-SPECIMEN-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12} with linked Observations: Observation/AD373CA7-3940-4249-85A2-D3A22E9F17C7, -->.*");
324+
assertThat(actualXml).matches("(?s).*<!-- Mapped Specimen with id: DUMMY-SPECIMEN-" + regexpUuid + " with linked Observations: " + expectObservation + ", -->.*");
323325

324326
}
325327

0 commit comments

Comments
 (0)