Ejemplo n.º 1
0
        public void Send_a_textMessage_with_inlineKeyboard_via_keboard_builder()
        {
            BaleClient client   = new BaleClient(Token);
            Response   response = client.SendTextMessage(new TextMessage()
            {
                ChatId      = ChatId,
                Text        = "click on buttons",
                ReplyMarkup = ReplyKeyboard.Create().AddButton("button one").AddButton("button two")
                              .AddButton("button three").Build()
            });

            response.Ok.Should().BeTrue();
            response.Result.Should().NotBeNull();
        }
Ejemplo n.º 2
0
        public void Send_photo_with_keyboard_successfully()
        {
            BaleClient client   = new BaleClient(Token);
            Response   response = client.SendPhoto(new PhotoMessage()
            {
                Caption     = "image caption",
                ChatId      = ChatId,
                Photo       = Utils.ToBytes(FilePath + "lolo.png"),
                ReplyMarkup = ReplyKeyboard.Create().AddButton("download file").AddButton("something else").Build()
            });

            response.Ok.Should().BeTrue();
            response.Result.Photo.Count.Should().Be(1);
        }