File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
main/java/uk/nhs/adaptors/gp2gp/ehr/mapper
test/java/uk/nhs/adaptors/gp2gp/ehr/mapper Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,7 @@ public void validateXmlAgainstSchema(String xml) {
7272 String interactionId = redactionsContext .ehrExtractInteractionId ();
7373 boolean isRedactionInteraction = RedactionsContext .REDACTION_INTERACTION_ID .equals (interactionId );
7474
75- String schemaPath = isRedactionInteraction
76- ? RCMR_IN030000UK07_SCHEMA_PATH
77- : RCMR_IN030000UK06_SCHEMA_PATH ;
75+ String schemaPath = isRedactionInteraction ? RCMR_IN030000UK07_SCHEMA_PATH : RCMR_IN030000UK06_SCHEMA_PATH ;
7876 try {
7977 SchemaFactory factory = SchemaFactory .newDefaultInstance ();
8078 Schema schema = factory .newSchema (new File (schemaPath ));
Original file line number Diff line number Diff line change 11package uk .nhs .adaptors .gp2gp .ehr .mapper ;
22
33import static org .assertj .core .api .AssertionsForClassTypes .assertThat ;
4+ import static org .junit .Assert .assertTrue ;
45import static org .junit .jupiter .api .Assertions .assertDoesNotThrow ;
56import static org .mockito .ArgumentMatchers .any ;
67import static org .mockito .ArgumentMatchers .eq ;
1718import java .util .Collections ;
1819
1920import org .hl7 .fhir .dstu3 .model .Bundle ;
21+ import org .junit .jupiter .api .Assertions ;
2022import org .junit .jupiter .api .Test ;
2123import org .junit .jupiter .api .extension .ExtendWith ;
2224import org .mockito .InjectMocks ;
@@ -187,10 +189,9 @@ void When_ValidateXmlAgainstSchemaWithValidXmlAndAnyId_Expect_NoExceptionIsThrow
187189
188190 when (redactionsContext .ehrExtractInteractionId ())
189191 .thenReturn (RedactionsContext .REDACTION_INTERACTION_ID );
192+ Assertions .assertTrue (validXml .contains ("RCMR_IN030000UK07" ));
190193
191194 assertDoesNotThrow (() -> ehrExtractMapper .validateXmlAgainstSchema (validXml ));
192195 }
193196
194-
195-
196197}
You can’t perform that action at this time.
0 commit comments