public void TestEmptyOperatorWithSequenceOfMessages() { var field = new Scalar("", FASTType.U32, Operator.NONE, ScalarValue.UNDEFINED, true); MessageTemplate template = registerTemplate(field); var msg1 = new Message(template); var msg2 = new Message(template); msg2.SetInteger(1, 15); // --PMAP-- --TID--- ---#1--- String encoding = "11000000 11110001 10000000"; encodeAndAssertEquals(encoding, msg1); // --PMAP-- ---#1--- encoding = "10000000 10010000"; byte[] encodedMessage = encoder.Encode(msg2); TestUtil.AssertBitVectorEquals(encoding, encodedMessage); output.Write(encodedMessage); GroupValue readMessage = decoder.ReadMessage(); Assert.AreEqual(msg1, readMessage); readMessage = decoder.ReadMessage(); Assert.AreEqual(msg2, readMessage); }
private void EncodeAndAssertEquals(String encoding, Message msg1) { byte[] encodedMessage = _encoder.Encode(msg1); TestUtil.AssertBitVectorEquals(encoding, encodedMessage); _output.Write(encodedMessage); }