using Newtonsoft.Json;
using Telegram.Bot.Types.ReplyMarkups;
using Xunit;

namespace Telegram.Bot.Tests.Unit.Serialization
{
    public class ReplyMarkupSerializationTests
    {
        [Theory(DisplayName = "Should serialize request poll keyboard button")]
        [InlineData(null)]
        [InlineData("regular")]
        [InlineData("quiz")]
        public void Should_Serialize_Request_Poll_Keyboard_Button(string type)
        {
            IReplyMarkup replyMarkup = new ReplyKeyboardMarkup(
                KeyboardButton.WithRequestPoll("Create a poll", type)
            );

            string serializedReplyMarkup = JsonConvert.SerializeObject(replyMarkup);

            string expectedType = string.IsNullOrEmpty(type)
                ? "{}"
                : @$"{{""type"":""{type}""}}";

            Assert.Contains(@$"""request_poll"":{expectedType}", serializedReplyMarkup);
        }
    }
}

using Newtonsoft.Json;
using Telegram.Bot.Types.ReplyMarkups;
using Xunit;

namespace Telegram.Bot.Tests.Unit.Serialization
{
    public class ReplyMarkupSerializationTests
    {
        [Theory(DisplayName = "Should serialize request poll keyboard button")]
        [InlineData(null)]
        [InlineData("regular")]
        [InlineData("quiz")]
        public void Should_Serialize_Request_Poll_Keyboard_Button(string type)
        {
            IReplyMarkup replyMarkup = new ReplyKeyboardMarkup(
                KeyboardButton.WithRequestPoll("Create a poll", type)
            );

            string serializedReplyMarkup = JsonConvert.SerializeObject(replyMarkup);

            string expectedType = string.IsNullOrEmpty(type)
                ? "{}"
                : string.Format(@"{{""type"":""{0}""}}", type);

            Assert.Contains(@$"""request_poll"":{expectedType}", serializedReplyMarkup);
        }
    }
}

Change string formatting due to appveyor failing
Change string formatting due to appveyor failing
