コード例 #1
0
        public void ToStringTest()
        {
            var tpoe = new TopicPartitionOffsetError("mytopic", 42, 107, ErrorCode.Local_BadMsg);

            Assert.True(tpoe.ToString().Contains(tpoe.Topic));
            Assert.True(tpoe.ToString().Contains(tpoe.Partition.ToString()));
            Assert.True(tpoe.ToString().Contains(tpoe.Offset.ToString()));
            Assert.True(tpoe.ToString().Contains(tpoe.Error.ToString()));
            Assert.True(tpoe.ToString().Contains(tpoe.Error.Reason));
        }
コード例 #2
0
        public void ToStringTest()
        {
            var tpoe = new TopicPartitionOffsetError("mytopic", 42, 107, ErrorCode._BAD_MSG);

            Assert.True(tpoe.ToString().Contains(tpoe.Topic));
            Assert.True(tpoe.ToString().Contains(tpoe.Partition.ToString()));
            Assert.True(tpoe.ToString().Contains(tpoe.Offset.ToString()));
            Assert.True(tpoe.ToString().Contains(((int)tpoe.Error.Code).ToString()));
            Assert.True(tpoe.ToString().Contains(tpoe.Error.Message));
        }