Ejemplo n.º 1
0
        public void ConvertsCorrectly(byte[] bytes, string expectedHex)
        {
            string hex = HexConvert.ToHexString(bytes);

            Assert.Equal(expectedHex, hex);

            byte[] resultBytes = HexConvert.FromHexString(hex);
            Assert.Equal(bytes, resultBytes);
        }
Ejemplo n.º 2
0
 public void ThrowsWhenBytesNull()
 {
     Assert.Throws <ArgumentNullException>(() => HexConvert.ToHexString(null));
 }
Ejemplo n.º 3
0
 public static string ToHexString(this byte[] bytes) => HexConvert.ToHexString(bytes);