Exemplo n.º 1
0
        public void HexToBytes_EmptyString()
        {
            var result = Bio.HexToBytes("");

            Assert.AreEqual(0, result.Length);
            Assert.IsTrue(new byte[0].SequenceEqual(result));
        }
Exemplo n.º 2
0
        public void HexToBytes_ShouldIgnoreSpaces()
        {
            var hexString = "01 02 03 FF 1A";
            var expected  = new byte[] { 0x01, 0x02, 0x03, 0xFF, 0x1A };
            var result    = Bio.HexToBytes(hexString);

            Assert.AreEqual(expected.Length, result.Length);
            Assert.IsTrue(expected.SequenceEqual(result));
        }
Exemplo n.º 3
0
 public void HexToBytes_Null()
 {
     Bio.HexToBytes(null);
 }