/******************************************************************************* * Copyright (c) quickfixengine.org All rights reserved. * * This file is part of the QuickFIX FIX Engine * * This file may be distributed under the terms of the quickfixengine.org * license as defined by quickfixengine.org and appearing in the file * LICENSE included in the packaging of this file. * * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. * * See http://www.quickfixengine.org/LICENSE for licensing information. * * Contact ask@quickfixengine.org if any conditions of this licensing * are not clear to you. ******************************************************************************/ package quickfix; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.junit.Test; import quickfix.field.MDEntryPx; import quickfix.fix50.MarketDataSnapshotFullRefresh; public class QFJ644 { @Test public void testFieldWithEqualsCharacter() { try { final DataDictionary dd = DataDictionaryTest.getDictionary(); final Message m = new Message( "8=FIXT.1.1\0019=369\00135=W\00149=ICAPServer\00156=FXDD\00134=4\00152=20111021-15:09:16.535\001262=1319209757316210\00121=2\00155=EUR/USD\001461=RCSXX=0\001268=8\001269=0\001270=1.38898\001271=2000000\001269=0\001270=1.38897\001271=8000000\001269=0\001270=1.38854\001271=2000000\001269=1\001270=1.38855\001271=6000000\001269=1\001270=1.38856\001271=7000000\001269=1\001270=1.38857\001271=3000000\001269=1\001270=1.38858\001271=9000000\001269=1\001270=1.38859\001271=100000000\00110=51\001", dd, true); assertEquals(m.getString(461), "RCSXX=0"); final MarketDataSnapshotFullRefresh.NoMDEntries group = new MarketDataSnapshotFullRefresh.NoMDEntries(); m.getGroup(1, group); final MDEntryPx px = new MDEntryPx(); group.get(px); assertEquals(px.objectAsString(), "1.38898"); } catch (final Exception e) { final String text = e.getMessage(); assertTrue("Wrong exception message: " + text, text != null && text.indexOf("Actual body length") == -1); } } }