private void TestDecoderAndInputStream(String expected, IoBuffer input)
        {
            // Test ProtocolDecoder
            IProtocolDecoder decoder = new ObjectSerializationDecoder();
            ProtocolCodecSession session = new ProtocolCodecSession();
            IProtocolDecoderOutput decoderOut = session.DecoderOutput;
            decoder.Decode(session, input.Duplicate(), decoderOut);

            Assert.AreEqual(1, session.DecoderOutputQueue.Count);
            Assert.AreEqual(expected, session.DecoderOutputQueue.Dequeue());
        }
Esempio n. 2
0
        private void TestDecoderAndInputStream(String expected, IoBuffer input)
        {
            // Test ProtocolDecoder
            IProtocolDecoder       decoder    = new ObjectSerializationDecoder();
            ProtocolCodecSession   session    = new ProtocolCodecSession();
            IProtocolDecoderOutput decoderOut = session.DecoderOutput;

            decoder.Decode(session, input.Duplicate(), decoderOut);

            Assert.AreEqual(1, session.DecoderOutputQueue.Count);
            Assert.AreEqual(expected, session.DecoderOutputQueue.Dequeue());
        }