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

            Assert.IsNotNull(encoder);
            printEncoded("EncodeChoiceInChoice: ", encoder, coderTestUtils.createChoiceInChoice());
            checkEncoded(encoder, coderTestUtils.createChoiceInChoice(), coderTestUtils.createChoiceInChoiceBytes());
        }
Beispiel #2
0
        public void testDecodeChoiceInChoice()
        {
            IDecoder decoder = newDecoder();

            System.IO.MemoryStream stream = new System.IO.MemoryStream(coderTestUtils.createChoiceInChoiceBytes());
            BugValueType           val    = decoder.decode <BugValueType>(stream);

            Assert.AreEqual(val.isBugPrimitiveSelected(), coderTestUtils.createChoiceInChoice().isBugPrimitiveSelected());
            Assert.AreEqual(val.BugPrimitive.isBugIntegerSelected(), coderTestUtils.createChoiceInChoice().BugPrimitive.isBugIntegerSelected());
            Assert.AreEqual(val.BugPrimitive.BugInteger, coderTestUtils.createChoiceInChoice().BugPrimitive.BugInteger);
        }