Skip to content

Commit

Permalink
[PRMT-3413] Replace hard-coded odsCode and nhsNumber with enums
Browse files Browse the repository at this point in the history
  • Loading branch information
joefong-nhs committed Aug 14, 2023
1 parent 3d35bb9 commit 40bf900
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/main/java/uk/nhs/prm/e2etests/enumeration/Patient.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ public enum Patient {
SUSPENDED_WITH_EHR_AT_TPP("9693642937"),
PATIENT_WITH_LARGE_EHR_AT_EMIS_WITH_MOF_SET_TO_REPO_DEV_ODS("9693643038"),
PATIENT_WITH_LARGE_EHR_AT_EMIS_WITH_MOF_SET_TO_REPO_TEST_ODS("9694181372"),

PATIENT_WITH_SMALL_EHR_AT_REPO_WITH_MOF_SET_TO_TPP("9727018440"),

WITH_SINGLE_FRAGMENT_LARGE_EHR("9727018076"),
WITH_MULTIPLE_FRAGMENTS_LARGE_EHR("9693643038"),
WITH_HIGH_FRAGMENT_COUNT_LARGE_EHR("9693796179"),
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/uk/nhs/prm/e2etests/test/RepositoryE2ETest.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ void shouldVerifyThatALargeEhrXMLIsUnchanged() {
// Test Cases for Erroneous Inbound messages
private Arguments erroneousInboundMessage_UnrecognisedInteractionID() {
String invalidInteractionId = "TEST_XX123456XX01";
String nhsNumberForTestPatient = "9727018440";
String newGpOdsCode = "M85019";
String nhsNumber = Patient.PATIENT_WITH_SMALL_EHR_AT_REPO_WITH_MOF_SET_TO_TPP.nhsNumber();
String newGpOdsCode = Gp2GpSystem.TPP_PTL_INT.odsCode();

EhrRequestTemplateContext ehrRequestContext = EhrRequestTemplateContext.builder()
.nhsNumber(nhsNumberForTestPatient)
.nhsNumber(nhsNumber)
.newGpOdsCode(newGpOdsCode)
.build();

Expand All @@ -357,7 +357,7 @@ private Arguments erroneousInboundMessage_UnrecognisedInteractionID() {

private Arguments erroneousInboundMessage_EhrRequestWithUnrecognisedNhsNumber() {
String nonExistentNhsNumber = "9729999999";
String newGpOdsCode = "M85019";
String newGpOdsCode = Gp2GpSystem.TPP_PTL_INT.odsCode();

EhrRequestTemplateContext ehrRequestContext = EhrRequestTemplateContext.builder()
.nhsNumber(nonExistentNhsNumber)
Expand Down

0 comments on commit 40bf900

Please sign in to comment.