예제 #1
0
        public void SetUp()
        {
            d1 = new Dictionary <char, byte>
            {
                ['A'] = 1,
                ['B'] = 2,
                ['_'] = 0
            };

            dWeird = new Dictionary <char, byte>
            {
                ['A'] = 0x0B,
                ['B'] = 0x71,
                ['C'] = 0xE9,
                ['D'] = 0xFF
            };

            fiveBitA1 = new FixedWidthEncoder(5)
            {
                Encoding = d1
            };

            weirdEncoding = new FixedWidthEncoder(9)
            {
                Encoding = dWeird
            };
        }
예제 #2
0
        public void SetUp()
        {
            encoder1          = new FixedWidthEncoder(2, 0, 'A');
            encoder1.Encoding = new Dictionary <char, byte>()
            {
                { ' ', 0 },
                { 'A', 1 },
                { 'B', 2 },
                { 'C', 3 }
            };

            m1            = new FixedWidthMessage(encoder1, "011011");
            unitUnderTest = new FixedWidthDeserializer(m1);
        }