Beispiel #1
0
        public virtual void testEncode()
        {
            IEncoder encoder = newEncoder();

            Assert.IsNotNull(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());
        }
Beispiel #2
0
        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());
        }