示例#1
0
        public void KeepaliveMessageEncoding()
        {
            KeepaliveMessage originalMessage = new KeepaliveMessage();

            byte[] encodedBytes = new byte[256];

            int dataLength = originalMessage.EncodeFrameData(0, encodedBytes, 0);

            KeepaliveMessage decodedMessage = new KeepaliveMessage();

            decodedMessage.DecodeFrameData(0, encodedBytes, 0, dataLength);



            decodedMessage.MessageId = originalMessage.MessageId;


            String originalMessageString = originalMessage.ToString();
            String decodedMessageString  = decodedMessage.ToString();

            Assert.AreEqual(originalMessageString, decodedMessageString);
        }