Repository: xlate/staedi (java)

Issue:
GE control schema elements reversed
Currently:
GE01 = 28
GE02 = 97

Correct:
GE01 = 97
GE02 = 28


Pull request description:
Correct order of GE segment's elements in X12 control schema
Fixes #74 

Patch:
diff --git a/src/main/resources/X12/common.xml b/src/main/resources/X12/common.xml
index 5f5f777..aa36789 100644
--- a/src/main/resources/X12/common.xml
+++ b/src/main/resources/X12/common.xml
@@ -591,8 +591,8 @@
 
   <segmentType name="GE">
     <sequence>
-      <element type="E28" minOccurs="1"/>
       <element type="E97" minOccurs="1"/>
+      <element type="E28" minOccurs="1"/>
     </sequence>
   </segmentType>
 


Test patch:
diff --git a/src/test/java/io/xlate/edi/internal/stream/EventSequenceTest.java b/src/test/java/io/xlate/edi/internal/stream/EventSequenceTest.java
index aa82d45..11631b4 100644
--- a/src/test/java/io/xlate/edi/internal/stream/EventSequenceTest.java
+++ b/src/test/java/io/xlate/edi/internal/stream/EventSequenceTest.java
@@ -452,7 +452,7 @@ class EventSequenceTest {
         assertEquals(EDIStreamValidationError.INVALID_CHARACTER_DATA, reader.getErrorType());
         assertEquals("<TOO_LONG_AND_NOT_NUMERIC>", reader.getText());
         assertEquals(EDIStreamEvent.ELEMENT_DATA, reader.next()); // GE02
-        assertEquals("97", reader.getReferenceCode());
+        assertEquals("28", reader.getReferenceCode());
 
         // GE02 - 2nd occurrence
         assertEquals(EDIStreamEvent.ELEMENT_OCCURRENCE_ERROR, reader.next());
@@ -462,7 +462,7 @@ class EventSequenceTest {
 
         // GE02 - 3rd occurrence plus data error
         assertEquals(EDIStreamEvent.ELEMENT_OCCURRENCE_ERROR, reader.next());
-        assertEquals("97", reader.getReferenceCode());
+        assertEquals("28", reader.getReferenceCode());
         assertEquals(EDIStreamValidationError.TOO_MANY_REPETITIONS, reader.getErrorType());
         assertEquals(EDIStreamEvent.ELEMENT_DATA_ERROR, reader.next());
         assertEquals(EDIStreamValidationError.INVALID_CHARACTER_DATA, reader.getErrorType());