Esempio n. 1
0
        public void Update_message_must_fail_because_messageId_is_invalid()
        {
            BaleClient client       = new BaleClient(Token);
            Response   editResponse = client.EditTextMessage(new TextMessage()
            {
                ChatId = ChatId,
                Text   = "updated text message"
            }, 1010);


            editResponse.Ok.Should().BeFalse();
            editResponse.Description.Should().NotBeNull();
        }
Esempio n. 2
0
        public void Update_message_successfully()
        {
            BaleClient client   = new BaleClient(Token);
            Response   response = client.SendTextMessage(new TextMessage()
            {
                ChatId = ChatId,
                Text   = "salam"
            });


            Response editResponse = client.EditTextMessage(new TextMessage()
            {
                ChatId = ChatId,
                Text   = "updated text message"
            }, response.Result.MessageId);


            editResponse.Ok.Should().BeTrue();
            editResponse.Description.Should().BeNull();
        }