Exemplo n.º 1
0
        public void Delete_should_be_successfull_with_invalid_messageId()
        {
            GapClient gapClient = new GapClient(Token);

            PostResult deleteResult = gapClient.Delete(ChatId, "555555").Result;

            deleteResult.StatusCode.Should().Be(200);
        }
Exemplo n.º 2
0
        public void Delete_message()
        {
            GapClient gapClient = new GapClient(Token);

            Message message = new Message
            {
                ChatId = ChatId,
                Data   = "salam donya"
            };

            PostResult postResult = gapClient.Send(message).Result;
            MessageId  messageId  = Newtonsoft.Json.JsonConvert.DeserializeObject <MessageId>(postResult.RawBody);

            PostResult deleteResult = gapClient.Delete(ChatId, messageId.Id).Result;

            deleteResult.StatusCode.Should().Be(200);
        }