Skip to content

Commit af99965

Browse files
committed
Added better assertion.
1 parent 7a5be66 commit af99965

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/diagnosticreport/DiagnosticReportMapper.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import static uk.nhs.adaptors.gp2gp.ehr.mapper.diagnosticreport.ObservationMapper.NARRATIVE_STATEMENT_TEMPLATE;
1010

1111
import java.util.ArrayList;
12-
import java.util.Collections;
1312
import java.util.List;
1413
import java.util.Optional;
1514
import java.util.stream.Collectors;

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
@@ -318,7 +318,9 @@ void When_DiagnosticReport_Has_SpecimenALinkedTestResultAndAnUnlinkedTestResult_
318318
when(messageContext.getInputBundleHolder()).thenReturn(inputBundle);
319319

320320
final String actualXml = mapper.mapDiagnosticReportToCompoundStatement(diagnosticReport);
321-
assertThat(actualXml).contains("Mapped Specimen with id: DUMMY-SPECIMEN-");
321+
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, -->.*");
323+
322324
}
323325

324326
private Bundle getBundleResourceFromJson(String filename) {

0 commit comments

Comments
 (0)