@Test public void notInt() { value.setString("FOO"); exception.expect(FIXValueFormatException.class); value.asInt(); }
@Test public void notTimestamp() { value.setString("FOO"); exception.expect(FIXValueFormatException.class); value.asTimestamp(new MutableDateTime()); }
public void byteAt() { value.setString("FOO"); byte[] bytes = new byte[value.length()]; for (int i = 0; i < value.length(); i++) bytes[i] = value.byteAt(i); assertArrayEquals(new byte[] {'F', 'O', 'O'}, bytes); }
@Test public void set() { FIXValue anotherValue = new FIXValue(32); anotherValue.setString("FOO"); value.set(anotherValue); assertPutEquals("FOO\u0001"); }
@Test public void setString() { value.setString("FOO"); assertPutEquals("FOO\u0001"); }