Ejemplo n.º 1
0
        public void TestMethod_ByteArrayToString_true_one()
        {
            byte[]       source   = { 0x01 };
            const string expected = "01";
            string       result   = StringFunc.ByteArrayToString(source);

            Assert.AreEqual(result, expected);
        }
Ejemplo n.º 2
0
        public void TestMethod_ByteArrayToHexString_false()
        {
            byte[]       source   = { 0x01, 0x02, 0x03, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };
            const string expected = "01";
            string       result   = StringFunc.ByteArrayToString(source);

            Assert.AreNotEqual(result, expected);
        }
Ejemplo n.º 3
0
        public void TestMethod_ByteArrayToHexString_true()
        {
            byte[]       source   = { 0x01, 0x02, 0x03, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 };
            const string expected = "010203091011121314151617";
            string       result   = StringFunc.ByteArrayToString(source);

            Assert.AreEqual(result, expected);
        }