@Test public void testMessageGroupCountValidation() throws Exception { final String data = "8=FIX.4.4\0019=222\00135=D\00149=SenderCompId\00156=TargetCompId\00134=37\001" + "52=20070223-22:28:33\00111=183339\00122=8\00138=1\00140=2\00144=12\00148=BHP\00154=2\001" + "55=BHP\00159=1\00160=20060223-22:38:33\001526=3620\00178=0\00179=AllocACC1\00180=1010.1\001" + "79=AllocACC2\00180=2020.2\001453=2\001448=8\001447=D\001452=4\001448=AAA35354\001447=D\001452=3\00110=079\001"; final Message message = new Message(); final DataDictionary dd = DataDictionaryTest.getDictionary(); message.fromString(data, dd, true); try { dd.validate(message); fail("No exception thrown"); } catch (final FieldException e) { final String emsg = e.getMessage(); assertNotNull("No exception message", emsg); assertTrue(emsg.startsWith("Incorrect NumInGroup")); } }
public void fromString(String messageData, DataDictionary dd, boolean doValidation) throws InvalidMessage { parse(messageData, dd, dd, doValidation, true); }
Message extends FieldMap { public void fromString(String messageData, DataDictionary dd, boolean doValidation) throws InvalidMessage { parse(messageData, dd, dd, doValidation, true); } }
Message extends FieldMap { public void fromString(String messageData, DataDictionary dd, boolean doValidation) throws InvalidMessage { parse(messageData, dd, dd, doValidation, true); } Message(); protected  Message(int[] fieldOrder);  Message(String string);  Message(String string, boolean validate);  Message(String string, DataDictionary dd);  Message(String string, DataDictionary dd, boolean validate);  Message(String string, DataDictionary sessionDictionary, DataDictionary applicationDictionary, boolean validate); }
Message extends FieldMap { public void fromString(String messageData, DataDictionary dd, boolean doValidation) throws InvalidMessage { parse(messageData, dd, dd, doValidation, true); } Message(); protected  Message(int[] fieldOrder);  Message(String string);  Message(String string, boolean validate);  Message(String string, DataDictionary dd);  Message(String string, DataDictionary dd, boolean validate);  Message(String string, DataDictionary sessionDictionary, DataDictionary applicationDictionary, boolean validate); static boolean InitializeXML(String url); @Override Object clone(); @Override String toString(); String toRawString(); int bodyLength(); void headerAddGroup(Group group); void headerReplaceGroup(int num, Group group); Group headerGetGroup(int num, Group group); void headerRemoveGroup(Group group); boolean headerHasGroup(int field); boolean headerHasGroup(int num, int field); boolean headerHasGroup(int num, Group group); boolean headerHasGroup(Group group); void trailerAddGroup(Group group); Group trailerGetGroup(int num, Group group); void trailerReplaceGroup(int num, Group group); void trailerRemoveGroup(Group group); boolean trailerHasGroup(int field); boolean trailerHasGroup(int num, int field); boolean trailerHasGroup(int num, Group group); boolean trailerHasGroup(Group group); String toXML(); String toXML(DataDictionary dataDictionary); final Header getHeader(); final Trailer getTrailer(); boolean isAdmin(); boolean isApp(); @Override boolean isEmpty(); @Override void clear(); @Override void reset(); void reverseRoute(Header header); void fromString(String messageData, DataDictionary dd, boolean doValidation); void fromString(String messageData, DataDictionary dd, boolean doValidation,
            boolean validateChecksum); void fromString(String messageData, DataDictionary sessionDictionary,
            DataDictionary applicationDictionary, boolean doValidation); void fromString(String messageData, DataDictionary sessionDictionary,
            DataDictionary applicationDictionary, boolean doValidation, boolean validateChecksum); void pushBack(StringField field); FieldException getException(); static MsgType identifyType(String message); }
Message extends FieldMap { public void fromString(String messageData, DataDictionary dd, boolean doValidation) throws InvalidMessage { parse(messageData, dd, dd, doValidation, true); } Message(); protected  Message(int[] fieldOrder);  Message(String string);  Message(String string, boolean validate);  Message(String string, DataDictionary dd);  Message(String string, DataDictionary dd, boolean validate);  Message(String string, DataDictionary sessionDictionary, DataDictionary applicationDictionary, boolean validate); static boolean InitializeXML(String url); @Override Object clone(); @Override String toString(); String toRawString(); int bodyLength(); void headerAddGroup(Group group); void headerReplaceGroup(int num, Group group); Group headerGetGroup(int num, Group group); void headerRemoveGroup(Group group); boolean headerHasGroup(int field); boolean headerHasGroup(int num, int field); boolean headerHasGroup(int num, Group group); boolean headerHasGroup(Group group); void trailerAddGroup(Group group); Group trailerGetGroup(int num, Group group); void trailerReplaceGroup(int num, Group group); void trailerRemoveGroup(Group group); boolean trailerHasGroup(int field); boolean trailerHasGroup(int num, int field); boolean trailerHasGroup(int num, Group group); boolean trailerHasGroup(Group group); String toXML(); String toXML(DataDictionary dataDictionary); final Header getHeader(); final Trailer getTrailer(); boolean isAdmin(); boolean isApp(); @Override boolean isEmpty(); @Override void clear(); @Override void reset(); void reverseRoute(Header header); void fromString(String messageData, DataDictionary dd, boolean doValidation); void fromString(String messageData, DataDictionary dd, boolean doValidation,
            boolean validateChecksum); void fromString(String messageData, DataDictionary sessionDictionary,
            DataDictionary applicationDictionary, boolean doValidation); void fromString(String messageData, DataDictionary sessionDictionary,
            DataDictionary applicationDictionary, boolean doValidation, boolean validateChecksum); void pushBack(StringField field); FieldException getException(); static MsgType identifyType(String message);  }