Пример #1
0
        public void StringToBtyesTest()
        {
            string inSting = "初始化为适当的值";

            byte[] actual = ConvertCode.StringToBtyes(inSting);
            string text   = ConvertCode.BytesToString(actual, Separate.None);

            Assert.AreEqual(text, inSting);
        }
Пример #2
0
        public void BytesToStringTest()
        {
            byte[]   bytes = new byte[] { 1, 2, 3 };
            Separate se    = new Separate();

            string actual = ConvertCode.BytesToString(bytes, se);

            byte[] expected = ConvertCode.StringToBtyes(actual);
            Assert.AreEqual(expected.ArrayAreEqual(bytes), true);
        }