예제 #1
0
        public void TestEncoder()
        {
            String expected = "1234";

            ProtocolCodecSession session = new ProtocolCodecSession();
            IProtocolEncoderOutput output = session.EncoderOutput;

            IProtocolEncoder encoder = new ObjectSerializationEncoder();
            encoder.Encode(session, expected, output);

            Assert.AreEqual(1, session.EncoderOutputQueue.Count);
            IoBuffer buf = (IoBuffer)session.EncoderOutputQueue.Dequeue();

            TestDecoderAndInputStream(expected, buf);
        }
예제 #2
0
        public void TestEncoder()
        {
            String expected = "1234";

            ProtocolCodecSession   session = new ProtocolCodecSession();
            IProtocolEncoderOutput output  = session.EncoderOutput;

            IProtocolEncoder encoder = new ObjectSerializationEncoder();

            encoder.Encode(session, expected, output);

            Assert.AreEqual(1, session.EncoderOutputQueue.Count);
            IoBuffer buf = (IoBuffer)session.EncoderOutputQueue.Dequeue();

            TestDecoderAndInputStream(expected, buf);
        }