From 4c36750431c773d5a12517727e849ce90958a912 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 23 Aug 2020 23:42:50 +0600 Subject: [PATCH] add failing test which normally must be working ok --- .../TelegramBotAPI/SimpleInputFilesTest.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 TelegramBotAPI-core/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/SimpleInputFilesTest.kt diff --git a/TelegramBotAPI-core/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/SimpleInputFilesTest.kt b/TelegramBotAPI-core/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/SimpleInputFilesTest.kt new file mode 100644 index 0000000000..2661866c83 --- /dev/null +++ b/TelegramBotAPI-core/src/commonTest/kotlin/com/github/insanusmokrassar/TelegramBotAPI/SimpleInputFilesTest.kt @@ -0,0 +1,19 @@ +package com.github.insanusmokrassar.TelegramBotAPI + +import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.toInputFile +import com.github.insanusmokrassar.TelegramBotAPI.types.files.Photo +import com.github.insanusmokrassar.TelegramBotAPI.types.files.PhotoSize +import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media.PhotoContent +import kotlin.test.Test + +class SimpleInputFilesTest { + @Test + fun test_that_creating_of_photo_and_converting_to_input_media_working_correctly() { + val photoContent = PhotoContent( + listOf( + PhotoSize("example_file_id".toInputFile(), "example_unique_file_id", 100, 100, 100) + ) + ) + photoContent.toMediaGroupMemberInputMedia() + } +}