Skip to content

Commit 1905689

Browse files
authored
Remove unecessary usage of IsEqualToIgnoringWhitespace() (#1385)
* Corrected disparity between expected xml output and actual output * Fixed spacing issue with expected output xml
1 parent 8cfd98e commit 1905689

File tree

3 files changed

+26
-32
lines changed

3 files changed

+26
-32
lines changed

service/src/test/java/uk/nhs/adaptors/gp2gp/ehr/mapper/OutputMessageWrapperMapperTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void When_MappingOutputMessageWrapperWithStringContentAndRedactionsDisabled_Expe
6767
final String actual = outputMessageWrapperMapper.map(gpcStructuredTaskDefinition, TRANSFORMED_EXTRACT);
6868

6969
assertAll(
70-
() -> assertThat(actual).isEqualToIgnoringWhitespace(expected),
70+
() -> assertThat(actual).isEqualTo(expected),
7171
() -> assertThat(actual).contains(EHR_EXTRACT_INTERACTION_ID_NO_REDACTIONS),
7272
() -> assertThat(actual).doesNotContain(EHR_EXTRACT_INTERACTION_ID_WITH_REDACTIONS)
7373
);
@@ -82,7 +82,7 @@ void When_MappingOutputMessageWrapperWithStringContentAndRedactionsEnabled_Expec
8282
final String actual = outputMessageWrapperMapper.map(gpcStructuredTaskDefinition, TRANSFORMED_EXTRACT);
8383

8484
assertAll(
85-
() -> assertThat(actual).isEqualToIgnoringWhitespace(expected),
85+
() -> assertThat(actual).isEqualTo(expected),
8686
() -> assertThat(actual).contains(EHR_EXTRACT_INTERACTION_ID_WITH_REDACTIONS),
8787
() -> assertThat(actual).doesNotContain(EHR_EXTRACT_INTERACTION_ID_NO_REDACTIONS)
8888
);
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<RCMR_IN030000UK06 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="urn:hl7-org:v3 ..\Schemas\RCMR_IN030000UK06.xsd">
4-
<id root="394559384658936"/>
5-
<creationTime value="20200218170946"/>
6-
<versionCode code="V3NPfIT3.1.10"/>
7-
<interactionId root="2.16.840.1.113883.2.1.3.2.4.12" extension="RCMR_IN030000UK06"/>
8-
<processingCode code="P"/>
9-
<processingModeCode code="T"/>
10-
<acceptAckCode code="NE"/>
2+
<RCMR_IN030000UK06 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 ..\Schemas\RCMR_IN030000UK06.xsd">
3+
<id root="394559384658936" />
4+
<creationTime value="20200218170946" />
5+
<versionCode code="V3NPfIT3.1.10" />
6+
<interactionId root="2.16.840.1.113883.2.1.3.2.4.12" extension="RCMR_IN030000UK06" />
7+
<processingCode code="P" />
8+
<processingModeCode code="T" />
9+
<acceptAckCode code="NE" />
1110
<communicationFunctionRcv typeCode="RCV">
1211
<device classCode="DEV" determinerCode="INSTANCE">
13-
<id root="1.2.826.0.1285.0.2.0.107" extension="from-asid-value"/>
12+
<id root="1.2.826.0.1285.0.2.0.107" extension="from-asid-value" />
1413
</device>
1514
</communicationFunctionRcv>
1615
<communicationFunctionSnd typeCode="SND">
1716
<device classCode="DEV" determinerCode="INSTANCE">
18-
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value"/>
17+
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value" />
1918
</device>
2019
</communicationFunctionSnd>
2120
<ControlActEvent classCode="CACT" moodCode="EVN">
2221
<author1 typeCode="AUT">
2322
<AgentSystemSDS classCode="AGNT">
2423
<agentSystemSDS classCode="DEV" determinerCode="INSTANCE">
25-
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value"/>
24+
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value" />
2625
</agentSystemSDS>
2726
</AgentSystemSDS>
2827
</author1>
2928
<subject typeCode="SUBJ" contextConductionInd="false">
30-
<EhrExtract classCode="EXTRACT" moodCode="EVN">
31-
<id root="12345"/>
32-
</EhrExtract>
29+
<EhrExtract classCode="EXTRACT" moodCode="EVN"><id root="12345"/></EhrExtract>
3330
</subject>
3431
</ControlActEvent>
3532
</RCMR_IN030000UK06>
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<RCMR_IN030000UK07 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="urn:hl7-org:v3 ..\Schemas\RCMR_IN030000UK07.xsd">
4-
<id root="394559384658936"/>
5-
<creationTime value="20200218170946"/>
6-
<versionCode code="V3NPfIT3.1.10"/>
7-
<interactionId root="2.16.840.1.113883.2.1.3.2.4.12" extension="RCMR_IN030000UK07"/>
8-
<processingCode code="P"/>
9-
<processingModeCode code="T"/>
10-
<acceptAckCode code="NE"/>
2+
<RCMR_IN030000UK07 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 ..\Schemas\RCMR_IN030000UK07.xsd">
3+
<id root="394559384658936" />
4+
<creationTime value="20200218170946" />
5+
<versionCode code="V3NPfIT3.1.10" />
6+
<interactionId root="2.16.840.1.113883.2.1.3.2.4.12" extension="RCMR_IN030000UK07" />
7+
<processingCode code="P" />
8+
<processingModeCode code="T" />
9+
<acceptAckCode code="NE" />
1110
<communicationFunctionRcv typeCode="RCV">
1211
<device classCode="DEV" determinerCode="INSTANCE">
13-
<id root="1.2.826.0.1285.0.2.0.107" extension="from-asid-value"/>
12+
<id root="1.2.826.0.1285.0.2.0.107" extension="from-asid-value" />
1413
</device>
1514
</communicationFunctionRcv>
1615
<communicationFunctionSnd typeCode="SND">
1716
<device classCode="DEV" determinerCode="INSTANCE">
18-
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value"/>
17+
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value" />
1918
</device>
2019
</communicationFunctionSnd>
2120
<ControlActEvent classCode="CACT" moodCode="EVN">
2221
<author1 typeCode="AUT">
2322
<AgentSystemSDS classCode="AGNT">
2423
<agentSystemSDS classCode="DEV" determinerCode="INSTANCE">
25-
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value"/>
24+
<id root="1.2.826.0.1285.0.2.0.107" extension="to-asid-value" />
2625
</agentSystemSDS>
2726
</AgentSystemSDS>
2827
</author1>
2928
<subject typeCode="SUBJ" contextConductionInd="false">
30-
<EhrExtract classCode="EXTRACT" moodCode="EVN">
31-
<id root="12345"/>
32-
</EhrExtract>
29+
<EhrExtract classCode="EXTRACT" moodCode="EVN"><id root="12345"/></EhrExtract>
3330
</subject>
3431
</ControlActEvent>
3532
</RCMR_IN030000UK07>

0 commit comments

Comments
 (0)