Ejemplo n.º 1
0
        /// <seealso cref="Decoder.decode(InputStream,Class)">
        /// </seealso>
        public virtual void  testDecode()
        {
            IDecoder decoder = newDecoder();

            System.IO.MemoryStream stream = new System.IO.MemoryStream(
                (coderTestUtils.createDataSeqBytes()));
            DataSeq seq = decoder.decode <DataSeq>(stream);

            checkDataSeq(seq, coderTestUtils.createDataSeq());
        }
Ejemplo n.º 2
0
        /// <seealso cref="Encoder.encode(T,OutputStream)">
        /// </seealso>
        public virtual void  testEncode()
        {
            IEncoder encoder = newEncoder();

            Assert.NotNull(encoder);
            printEncoded("SequenceMO test", encoder, coderTestUtils.createDataSeqMO());
            checkEncoded(encoder, coderTestUtils.createDataSeqMO(), coderTestUtils.createDataSeqMOBytes());

            printEncoded("Sequence test", encoder, coderTestUtils.createDataSeq());
            checkEncoded(encoder, coderTestUtils.createDataSeq(), coderTestUtils.createDataSeqBytes());
        }