Example #1
0
 @Test
 public void subMsg() {
   FudgeFieldContainer inputMsg = StandardFudgeMessages.createMessageWithSubMsgs(s_fudgeContext);
   FudgeFieldContainer outputMsg = cycleMessage(inputMsg);
   assertNotNull(outputMsg);
   FudgeUtils.assertAllFieldsMatch(inputMsg, outputMsg);
 }
Example #2
0
 @Test
 public void unknown() {
   MutableFudgeFieldContainer inputMsg = s_fudgeContext.newMessage();
   inputMsg.add(
       "unknown",
       new UnknownFudgeFieldValue(
           new byte[10], s_fudgeContext.getTypeDictionary().getUnknownType(200)));
   FudgeFieldContainer outputMsg = cycleMessage(inputMsg);
   FudgeUtils.assertAllFieldsMatch(inputMsg, outputMsg);
 }
Example #3
0
 @Test
 public void variableWidthColumnSizes() {
   MutableFudgeFieldContainer inputMsg = s_fudgeContext.newMessage();
   inputMsg.add("100", new byte[100]);
   inputMsg.add("1000", new byte[1000]);
   inputMsg.add("10000", new byte[100000]);
   FudgeFieldContainer outputMsg = cycleMessage(inputMsg);
   assertNotNull(outputMsg);
   FudgeUtils.assertAllFieldsMatch(inputMsg, outputMsg);
 }
Example #4
0
  @Test
  public void fixedWidthByteArrays() {
    MutableFudgeFieldContainer inputMsg = s_fudgeContext.newMessage();
    inputMsg.add("byte[4]", createRandomArray(4));
    inputMsg.add("byte[8]", createRandomArray(8));
    inputMsg.add("byte[16]", createRandomArray(16));
    inputMsg.add("byte[20]", createRandomArray(20));
    inputMsg.add("byte[32]", createRandomArray(32));
    inputMsg.add("byte[64]", createRandomArray(64));
    inputMsg.add("byte[128]", createRandomArray(128));
    inputMsg.add("byte[256]", createRandomArray(256));
    inputMsg.add("byte[512]", createRandomArray(512));

    inputMsg.add("byte[28]", createRandomArray(28));

    FudgeFieldContainer outputMsg = cycleMessage(inputMsg);
    FudgeUtils.assertAllFieldsMatch(inputMsg, outputMsg);
  }