示例#1
0
        public void SerializeNullData()
        {
            var arraySerdes = new ByteArraySerDes();
            var r           = arraySerdes.Serialize(null);

            Assert.IsNull(r);
        }
示例#2
0
        public void SerializeNullData()
        {
            var arraySerdes = new ByteArraySerDes();
            var r           = arraySerdes.Serialize(null, new Confluent.Kafka.SerializationContext());

            Assert.IsNull(r);
        }
示例#3
0
        public void DeserializeData()
        {
            byte[] b           = new byte[] { 4, 1, 2, 3 };
            var    arraySerdes = new ByteArraySerDes();
            var    r           = arraySerdes.Deserialize(arraySerdes.Serialize(b));

            Assert.IsNotNull(r);
            Assert.AreEqual(b, r);
        }
示例#4
0
        public void SerializeData()
        {
            byte[] b           = new byte[] { 4, 1, 2, 3 };
            var    arraySerdes = new ByteArraySerDes();
            var    r           = arraySerdes.Serialize(b, new Confluent.Kafka.SerializationContext());

            Assert.IsNotNull(r);
            Assert.AreEqual(b, r);
        }