Example #1
0
        public void AppendIfNotNull()
        {
            var builder = new StringBuilder();

            SerializerHelper.AppendIfNotNull(builder, "prefix:", null);
            Assert.AreEqual(string.Empty, builder.ToString());

            SerializerHelper.AppendIfNotNull(builder, "prefix:", "value");
            Assert.AreEqual("prefix:value", builder.ToString());
        }