Beispiel #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));
        }
Beispiel #2
0
 public void EncodeReverse_ExceptionTest()
 {
     Assert.Throws <ArgumentNullException>(() => Base16.EncodeReverse(null));
 }
Beispiel #3
0
        public void EncodeReverseTest(byte[] ba, string expected)
        {
            string actual = Base16.EncodeReverse(ba);

            Assert.Equal(expected, actual);
        }