Wrong assertion always true(compares same object)

Probably due to carelessness the same object is compared and the assertion is always true. Sonarlint raised this issue.
This commit is contained in:
AndreicaRadu 2022-05-08 18:16:04 +03:00 committed by GitHub
parent 622cab39fc
commit 3b080a149a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -383,7 +383,7 @@ public class AbilityBotTest {
Map<String, Long> expectedUserIds = ImmutableMap.of(changedUser.getUserName(), changedUser.getId());
Map<Long, User> expectedUsers = ImmutableMap.of(changedUser.getId(), changedUser);
assertEquals(bot.userIds(), expectedUserIds, "User was not properly edited");
assertEquals(expectedUsers, expectedUsers, "User was not properly edited");
assertEquals(bot.users(), expectedUsers, "User was not properly edited");
}
@Test