File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -160,8 +160,7 @@ void When_MappingAllergyIntoleranceJson_Expect_AllergyStructureXmlOutput(String
160160
161161 @ ParameterizedTest
162162 @ MethodSource ("resourceFileParamsWithEnvironmentCategoryAndConditionRelatedData" )
163- void When_MappingAllergyIntoleranceJson_Expect_AllergyStructureXmlOutputWithEnvironmentCategoryAndConditionRelatedData
164- (String inputJson , String outputXml ) {
163+ void When_MappingAllergyIntoleranceJson_Expect_AllergyStructureXmlOutputWithEnvironmentAndData (String inputJson , String outputXml ) {
165164 final var expectedMessage = ResourceTestFileUtils .getFileContent (TEST_FILE_DIRECTORY + outputXml );
166165 final var allergyIntolerance = parseAllergyIntoleranceFromJsonFile (TEST_FILE_DIRECTORY + inputJson );
167166
@@ -185,11 +184,11 @@ void When_MappingInvalidAllergyIntoleranceJson_Expect_Exception(String inputJson
185184 @ Test
186185 void When_ConfidentialityServiceReturnsConfidentialityCode_Expect_MessageContainsConfidentialityCode () {
187186 final var allergyIntolerance = parseAllergyIntoleranceFromJsonFile (INPUT_JSON_WITH_OPTIONAL_TEXT_FIELDS );
188- when (confidentialityService .generateConfidentialityCode (allergyIntolerance ))
189- .thenReturn (Optional .of (CONFIDENTIALITY_CODE ));
190-
191187 final var message = allergyStructureMapper .mapAllergyIntoleranceToAllergyStructure (allergyIntolerance );
192188
189+ when (confidentialityService .generateConfidentialityCode (allergyIntolerance ))
190+ .thenReturn (Optional .of (CONFIDENTIALITY_CODE ));
191+
193192 assertThat (message ).contains (CONFIDENTIALITY_CODE );
194193 assertThat (StringUtils .countOccurrencesOf (message , CONFIDENTIALITY_CODE ))
195194 .withFailMessage ("<confidentialityCode /> should appear within both the CompoundStatement and ObservationStatement" )
You can’t perform that action at this time.
0 commit comments