Skip to content

Commit 811c99a

Browse files
committed
Inject an invalid XML value to test NACK scenario
1 parent 9c14598 commit 811c99a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ public String mapDocumentReferenceToNarrativeStatement(final DocumentReference d
6666
documentReference.getIdElement().getIdPart());
6767
}
6868

69+
if ("Random text generated to test GP2GP".equals(documentReference.getType().getText())) {
70+
builder.participant("<Participant>This is an invalid participant value.</Participant>");
71+
}
72+
6973
builder.referenceTitle("${" + FILENAME_TEMPLATE + narrativeStatementId + "}")
7074
.comment(getComment(documentReference, narrativeStatementId))
7175
.referenceContentType("${" + ATTACHMENT_CONTENT_TYPE_PLACEHOLDER + narrativeStatementId + "}");

0 commit comments

Comments
 (0)