Beispiel #1
0
        public virtual TestI14 createTestInteger2_12()
        {
            TestI14 value_Renamed = new TestI14();

            value_Renamed.Value = 0x1FF1;
            return(value_Renamed);
        }
Beispiel #2
0
        public virtual void testDecodeInteger()
        {
            IDecoder decoder = newDecoder();

            System.IO.MemoryStream stream = new System.IO.MemoryStream((coderTestUtils.createTestInteger4Bytes()));

            TestI32 val = decoder.decode <TestI32>(stream);

            Assert.IsNotNull(val);
            Assert.AreEqual(val.Value, coderTestUtils.createTestInteger4().Value);

            stream = new System.IO.MemoryStream((coderTestUtils.createTestInteger3Bytes()));
            TestI16 val16 = decoder.decode <TestI16>(stream);

            Assert.IsNotNull(val16);
            Assert.AreEqual(val16.Value, coderTestUtils.createTestInteger3().Value);

            stream = new System.IO.MemoryStream((coderTestUtils.createTestInteger2Bytes()));
            val16  = decoder.decode <TestI16>(stream);
            Assert.IsNotNull(val16);
            Assert.AreEqual(val16.Value, coderTestUtils.createTestInteger2().Value);

            stream = new System.IO.MemoryStream((coderTestUtils.createTestInteger1Bytes()));
            TestI8 val8 = decoder.decode <TestI8>(stream);

            Assert.IsNotNull(val8);
            Assert.AreEqual(val8.Value, coderTestUtils.createTestInteger1().Value);

            stream = new System.IO.MemoryStream((coderTestUtils.createTestIntegerRBytes()));
            TestIR valR = decoder.decode <TestIR>(stream);

            Assert.IsNotNull(valR);
            Assert.AreEqual(valR.Value, coderTestUtils.createTestIntegerR().Value);

            stream = new System.IO.MemoryStream((coderTestUtils.createTestInteger2_12Bytes()));
            TestI14 val14 = decoder.decode <TestI14>(stream);

            Assert.IsNotNull(val14);
            Assert.AreEqual(val14.Value, coderTestUtils.createTestInteger2_12().Value);
        }