public void Send_photo_successfully() { BaleClient client = new BaleClient(Token); Response response = client.SendPhoto(new PhotoMessage() { Caption = "image caption", ChatId = ChatId, Photo = Utils.ToBytes(FilePath + "lolo.png") }); response.Ok.Should().BeTrue(); response.Result.Photo.Count.Should().Be(1); }
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); }
public void Get_file_successfully() { BaleClient client = new BaleClient(Token); Response sendPhotoResponse = client.SendPhoto(new PhotoMessage() { Caption = "image caption", ChatId = ChatId, Photo = Utils.ToBytes(FilePath + "lolo.png") }); string fileId = sendPhotoResponse.Result.Photo[0].FileId; Response <File> response = client.GetFile(fileId); response.Ok.Should().BeTrue(); response.Result.FileId.Should().Be(fileId); }