Exemplo n.º 1
0
        private static void Test(Keccak[] keys)
        {
            GetNodeDataMessage           message    = new GetNodeDataMessage(keys);
            GetNodeDataMessageSerializer serializer = new GetNodeDataMessageSerializer();

            SerializerTester.TestZero(serializer, message);
        }
        private static void Test(Keccak[] keys)
        {
            GetNodeDataMessage           message    = new GetNodeDataMessage(keys);
            GetNodeDataMessageSerializer serializer = new GetNodeDataMessageSerializer();
            var serialized = serializer.Serialize(message);
            GetNodeDataMessage deserialized = serializer.Deserialize(serialized);

            Assert.AreEqual(keys.Length, deserialized.Keys.Length, "length");
            for (int i = 0; i < keys.Length; i++)
            {
                Assert.AreEqual(keys[i], deserialized.Keys[i], $"keys[{i}]");
            }
        }