Ejemplo n.º 1
0
        public void TestMultiChainHexStringToBytes()
        {
            // Setup
            var chain  = new MultiChain();
            var verify = new byte[]
            {
                0x49, 0xd9, 0xc6, 0xac, 0x05, 0xfd, 0xec, 0x3e, 0xe6, 0x90, 0x99, 0xdf, 0x64, 0xa0, 0x1f, 0xd5,
                0xda, 0x2b, 0x4d, 0x93, 0x05, 0x0a, 0x13, 0xdb, 0x3d, 0x5a, 0xca, 0x37, 0xb8, 0x83, 0x37, 0xac
            };

            // Test
            var bytes = chain.HexStringToBytes("49D9C6AC05FDEC3EE69099DF64A01FD5DA2B4D93050A13DB3D5ACA37B88337AC");

            // Check
            Assert.IsNotNull(bytes);
            for (int i = 0; i < verify.Length; i++)
            {
                Assert.AreEqual(verify[i], bytes[i]);
            }
        }