fail("Expected SAXException");
}
}
public void test_parseMappingModel() throws IOException, SAXException, EDIConfigurationException {
EdifactModel map = EDIParser.parseMappingModel(getClass().getResourceAsStream("edi-mapping_01.xml"));
// Some basic checks on the model produced by xmlbeans...
// Make sure xml character refs are rewritten on the delimiters
assertEquals("\n", map.getDelimiters().getSegment());
assertEquals("*", map.getDelimiters().getField());
assertEquals("^", map.getDelimiters().getComponent());
assertEquals("~", map.getDelimiters().getSubComponent());
assertEquals("message-x", map.getEdimap().getSegments().getXmltag());
List<SegmentGroup> segments = map.getEdimap().getSegments().getSegments();
assertEquals(2, segments.size());
Segment segment = (Segment) segments.get(0);
assertEquals(1, segment.getSegments().size());
assertEquals(1, segment.getFields().size());