#269 Added TelegramBatchLongPollingBotTest
This commit is contained in:
parent
5741e4ba97
commit
fefe0cff05
@ -0,0 +1,19 @@
|
|||||||
|
package org.telegram.telegrambots.test;
|
||||||
|
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.mockito.Mockito;
|
||||||
|
import org.telegram.telegrambots.api.objects.Update;
|
||||||
|
import org.telegram.telegrambots.bots.TelegramBatchLongPollingBot;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
public class TelegramBatchLongPollingBotTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testOnUpdateReceived() throws Exception {
|
||||||
|
TelegramBatchLongPollingBot bot = Mockito.mock(TelegramBatchLongPollingBot.class);
|
||||||
|
Update update = new Update();
|
||||||
|
bot.onUpdateReceived(update);
|
||||||
|
Mockito.verify(bot).onUpdatesReceived(Collections.singletonList(update));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user