Skip to content

Commit fa2b30e

Browse files
e210mgaffigan
authored andcommitted
Test a missing ISA element in EDISerializerTest (#450)
Signed-off-by: Ezio Caffi <ezio.caffi@gmail.com>
1 parent 464b729 commit fa2b30e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎server/src/test/java/com/mirth/connect/plugins/datatypes/edi/EDISerializerTest.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public void testFromXMLPadsBlankIsaFields() throws Exception {
5454
assertEquals(validX12, serializer.fromXML(xml));
5555
}
5656

57+
@Test
58+
public void testFromXMLPadsMissingIsaElement() throws Exception {
59+
// The whole <ISA.02> element is gone, not just empty
60+
String xml = serializer.toXML(validX12).replace("<ISA.02><ISA.02.1> </ISA.02.1></ISA.02>", "");
61+
assertEquals(validX12, serializer.fromXML(xml));
62+
}
63+
5764
@Test
5865
public void testFromXMLPadsShortIsaValues() throws Exception {
5966
String xml = serializer.toXML(validX12)

0 commit comments

Comments
 (0)