Skip to content

Commit

Permalink
Inject an invalid XML value to test NACK scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianclay committed Dec 2, 2024
1 parent 9c14598 commit 811c99a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public String mapDocumentReferenceToNarrativeStatement(final DocumentReference d
documentReference.getIdElement().getIdPart());
}

if ("Random text generated to test GP2GP".equals(documentReference.getType().getText())) {

Check warning on line 69 in service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/DocumentReferenceToNarrativeStatementMapper.java

View workflow job for this annotation

GitHub Actions / pitest

A change can be made to line 69 without causing a test to fail

removed conditional - replaced equality check with false (covered by 24 tests RemoveConditionalMutator_EQUAL_ELSE)
builder.participant("<Participant>This is an invalid participant value.</Participant>");

Check warning on line 70 in service/src/main/java/uk/nhs/adaptors/gp2gp/ehr/mapper/DocumentReferenceToNarrativeStatementMapper.java

View workflow job for this annotation

GitHub Actions / pitest

A change can be made to line 70 without causing a test to fail

removed call to participant (no tests cover this line RemoveChainedCallsMutator)
}

builder.referenceTitle("${" + FILENAME_TEMPLATE + narrativeStatementId + "}")
.comment(getComment(documentReference, narrativeStatementId))
.referenceContentType("${" + ATTACHMENT_CONTENT_TYPE_PLACEHOLDER + narrativeStatementId + "}");
Expand Down

0 comments on commit 811c99a

Please sign in to comment.