#269 Added TelegramBatchLongPollingBotTest

This commit is contained in:
vsubhuman 2017-08-03 12:19:19 +03:00
parent 5741e4ba97
commit fefe0cff05

View File

@ -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));
}
}