From 82659125d1b39113f7069ee986621ee8a0151193 Mon Sep 17 00:00:00 2001 From: Ruben Bermudez Date: Tue, 21 Jun 2022 21:35:42 +0200 Subject: [PATCH] Fix tests --- .../org/telegram/abilitybots/api/bot/AbilityBotI18nTest.java | 4 ++-- .../java/org/telegram/abilitybots/api/bot/AbilityBotTest.java | 2 +- .../test/java/org/telegram/abilitybots/api/bot/TestUtils.java | 4 ++-- .../org/telegram/abilitybots/api/db/MapDBContextTest.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotI18nTest.java b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotI18nTest.java index 3175f03d..256c79aa 100644 --- a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotI18nTest.java +++ b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotI18nTest.java @@ -19,8 +19,8 @@ import static org.telegram.abilitybots.api.bot.TestUtils.mockContext; import static org.telegram.abilitybots.api.db.MapDBContext.offlineInstance; class AbilityBotI18nTest { - private static final User NO_LANGUAGE_USER = new User(1L, "first", false, "last", "username", null, false, false, false); - private static final User ITALIAN_USER = new User(2L, "first", false, "last", "username", "it-IT", false, false, false); + private static final User NO_LANGUAGE_USER = new User(1L, "first", false, "last", "username", null, false, false, false, false, false); + private static final User ITALIAN_USER = new User(2L, "first", false, "last", "username", "it-IT", false, false, false, false, false); private DBContext db; private NoPublicCommandsBot bot; diff --git a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java index bf917b48..bbb4b431 100644 --- a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java +++ b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/AbilityBotTest.java @@ -374,7 +374,7 @@ public class AbilityBotTest { String newFirstName = USER.getFirstName() + "-test"; String newLastName = USER.getLastName() + "-test"; long sameId = USER.getId(); - User changedUser = new User(sameId, newFirstName, false, newLastName, newUsername, "en", false, false, false); + User changedUser = new User(sameId, newFirstName, false, newLastName, newUsername, "en", false, false, false, false, false); mockAlternateUser(update, message, changedUser); diff --git a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/TestUtils.java b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/TestUtils.java index ea36c023..5b55cf65 100644 --- a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/TestUtils.java +++ b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/bot/TestUtils.java @@ -11,8 +11,8 @@ import static org.mockito.Mockito.when; import static org.telegram.abilitybots.api.objects.MessageContext.newContext; public final class TestUtils { - public static final User USER = new User(1L, "first", false, "last", "username", null, false, false, false); - public static final User CREATOR = new User(1337L, "creatorFirst", false, "creatorLast", "creatorUsername", null, false, false, false); + public static final User USER = new User(1L, "first", false, "last", "username", null, false, false, false, false, false); + public static final User CREATOR = new User(1337L, "creatorFirst", false, "creatorLast", "creatorUsername", null, false, false, false, false, false); private TestUtils() { diff --git a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java index c933e5e5..1277daf9 100644 --- a/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java +++ b/telegrambots-abilities/src/test/java/org/telegram/abilitybots/api/db/MapDBContextTest.java @@ -154,6 +154,6 @@ class MapDBContextTest { var.set(USER); db.commit(); Var changedVar = db.getVar(varName); - Assertions.assertEquals("MapDBVar{var=User(id=1, firstName=first, isBot=false, lastName=last, userName=username, languageCode=null, canJoinGroups=false, canReadAllGroupMessages=false, supportInlineQueries=false)}", ((MapDBVar) (changedVar)).toString()); + Assertions.assertEquals("MapDBVar{var=User(id=1, firstName=first, isBot=false, lastName=last, userName=username, languageCode=null, canJoinGroups=false, canReadAllGroupMessages=false, supportInlineQueries=false, isPremium=false, addedToAttachmentMenu=false)}", ((MapDBVar) (changedVar)).toString()); } }