Skip to content

Commit af37989

Browse files
committed
Test for stickerSet.thumb
1 parent 822915a commit af37989

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/src/test/java/com/pengrad/telegrambot/TelegramBotTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,6 +1397,14 @@ public void setStickerSetThumb() {
13971397
BaseResponse response = bot.execute(new SetStickerSetThumb(stickerSetAnim, chatId, thumbFile));
13981398
assertTrue(response.isOk());
13991399

1400+
StickerSet set = bot.execute(new GetStickerSet(stickerSetAnim)).stickerSet();
1401+
assertTrue(set.isAnimated());
1402+
PhotoSize thumb = set.thumb();
1403+
PhotoSizeTest.checkPhotos(thumb);
1404+
assertEquals(Integer.valueOf(100), thumb.width());
1405+
assertEquals(Integer.valueOf(100), thumb.height());
1406+
assertEquals(Integer.valueOf(8244), thumb.fileSize());
1407+
14001408
// clear thumb by not sending it
14011409
response = bot.execute(new SetStickerSetThumb(stickerSetAnim, chatId));
14021410
assertTrue(response.isOk());

0 commit comments

Comments
 (0)