mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +00:00
make the test failing again
This commit is contained in:
parent
6420737a82
commit
6788c4d1dd
@ -1,11 +1,19 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI
|
package com.github.insanusmokrassar.TelegramBotAPI
|
||||||
|
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.toInputFile
|
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.toInputFile
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Photo
|
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.MediaGroupMemberInputMediaSerializer
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.files.PhotoSize
|
import com.github.insanusmokrassar.TelegramBotAPI.types.files.PhotoSize
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media.PhotoContent
|
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media.PhotoContent
|
||||||
|
import kotlinx.serialization.json.Json
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
|
|
||||||
|
private val nonstrictJsonFormat = Json {
|
||||||
|
isLenient = true
|
||||||
|
ignoreUnknownKeys = true
|
||||||
|
allowSpecialFloatingPointValues = true
|
||||||
|
useArrayPolymorphism = true
|
||||||
|
}
|
||||||
|
|
||||||
class SimpleInputFilesTest {
|
class SimpleInputFilesTest {
|
||||||
@Test
|
@Test
|
||||||
fun test_that_creating_of_photo_and_converting_to_input_media_working_correctly() {
|
fun test_that_creating_of_photo_and_converting_to_input_media_working_correctly() {
|
||||||
@ -14,6 +22,9 @@ class SimpleInputFilesTest {
|
|||||||
PhotoSize("example_file_id".toInputFile(), "example_unique_file_id", 100, 100, 100)
|
PhotoSize("example_file_id".toInputFile(), "example_unique_file_id", 100, 100, 100)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
photoContent.toMediaGroupMemberInputMedia()
|
nonstrictJsonFormat.encodeToString(
|
||||||
|
MediaGroupMemberInputMediaSerializer,
|
||||||
|
photoContent.toMediaGroupMemberInputMedia()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user