Fix ability bot test
This commit is contained in:
parent
0ec2e32bc9
commit
aff5385685
@ -26,6 +26,7 @@ import org.telegram.telegrambots.meta.api.objects.File;
|
|||||||
import org.telegram.telegrambots.meta.api.objects.Message;
|
import org.telegram.telegrambots.meta.api.objects.Message;
|
||||||
import org.telegram.telegrambots.meta.api.objects.Update;
|
import org.telegram.telegrambots.meta.api.objects.Update;
|
||||||
import org.telegram.telegrambots.meta.api.objects.User;
|
import org.telegram.telegrambots.meta.api.objects.User;
|
||||||
|
import org.telegram.telegrambots.meta.api.objects.chatmember.ChatMember;
|
||||||
import org.telegram.telegrambots.meta.api.objects.chatmember.ChatMemberAdministrator;
|
import org.telegram.telegrambots.meta.api.objects.chatmember.ChatMemberAdministrator;
|
||||||
import org.telegram.telegrambots.meta.exceptions.TelegramApiException;
|
import org.telegram.telegrambots.meta.exceptions.TelegramApiException;
|
||||||
|
|
||||||
@ -453,8 +454,8 @@ public class AbilityBotTest {
|
|||||||
mockUser(update, message, user);
|
mockUser(update, message, user);
|
||||||
when(message.isGroupMessage()).thenReturn(true);
|
when(message.isGroupMessage()).thenReturn(true);
|
||||||
|
|
||||||
ChatMemberAdministrator member = mock(ChatMemberAdministrator.class);
|
ChatMember member = mock(ChatMember.class);
|
||||||
when(member.getUser()).thenReturn(user);
|
when(member.getStatus()).thenReturn(ChatMemberAdministrator.STATUS);
|
||||||
when(member.getUser()).thenReturn(user);
|
when(member.getUser()).thenReturn(user);
|
||||||
|
|
||||||
when(silent.execute(any(GetChatAdministrators.class))).thenReturn(Optional.of(newArrayList(member)));
|
when(silent.execute(any(GetChatAdministrators.class))).thenReturn(Optional.of(newArrayList(member)));
|
||||||
|
Loading…
Reference in New Issue
Block a user