Ejemplo n.º 1
0
        public void EncodeReverse_AllCharsTest()
        {
            byte[] allHexChars = new byte[256];
            var    sb          = new StringBuilder(256 * 2);

            for (int i = 255; i >= 0; i--)
            {
                allHexChars[i] = (byte)i;
                sb.Append($"{allHexChars[i]:x2}");
            }

            Assert.Equal(sb.ToString(), Base16.EncodeReverse(allHexChars));
        }
Ejemplo n.º 2
0
 public void EncodeReverse_ExceptionTest()
 {
     Assert.Throws <ArgumentNullException>(() => Base16.EncodeReverse(null));
 }
Ejemplo n.º 3
0
        public void EncodeReverseTest(byte[] ba, string expected)
        {
            string actual = Base16.EncodeReverse(ba);

            Assert.Equal(expected, actual);
        }