Esempio n. 1
0
        public void ParseAsciiStringTest()
        {
            byte[] encodedString        = { 0x5C, 0x2B, 0x31, 0x35, 0x34, 0x30, 0x32, 0x33, 0x39, 0x32, 0x33, 0x30, 0x34 };
            string parsedStringExpected = "+15402392304";
            string parsedStringActual   = BPListParser_Accessor.ParseAsciiString(encodedString, 0);

            Assert.AreEqual(parsedStringExpected, parsedStringActual);
        }
Esempio n. 2
0
        public void ParseAsciiLongStringTest()
        {
            byte[] encodedString = { 0x5F, 0x10, 0x27, 0x73, 0x75, 0x70, 0x65, 0x72, 0x64, 0x6f, 0x6F, 0x70, 0x65, 0x72, 0x61, 0x77, 0x65, 0x73, 0x6F,
                                     0x6D, 0x65, 0x67, 0x75, 0x79, 0x40, 0x61, 0x77, 0x65, 0x73, 0x6F, 0x6D, 0x65, 0x74, 0x6F, 0x77, 0x6E, 0x2E, 0x63,
                                     0x6F, 0x2E, 0x75, 0x6B };
            string parsedStringExpected = "*****@*****.**"; //len=39
            string parsedStringActual   = BPListParser_Accessor.ParseAsciiString(encodedString, 0);

            Assert.AreEqual(parsedStringExpected, parsedStringActual);
        }