1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

[sinttest] Improve assertion message of mucDestroyTest()

Improve the assertion message of mucDestroyTest() by including the
still joined rooms.
This commit is contained in:
Florian Schmaus 2024-05-21 12:37:26 +02:00
parent d2810cf9b6
commit 41022d139b

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smackx.muc;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import java.util.Set;
import java.util.concurrent.TimeoutException;
import org.jivesoftware.smack.MessageListener;
@ -123,7 +124,8 @@ public class MultiUserChatIntegrationTest extends AbstractMultiUserChatIntegrati
muc.removeUserStatusListener(userStatusListener);
}
assertEquals(0, mucManagerOne.getJoinedRooms().size(), "Expected " + conOne.getUser() + " to no longer be in any rooms after " + mucAddress + " was destroyed (but was).");
Set<EntityBareJid> joinedRooms = mucManagerOne.getJoinedRooms();
assertEquals(0, joinedRooms.size(), "Expected " + conOne.getUser() + " to no longer be in any rooms after " + mucAddress + " was destroyed. But it is still in " + joinedRooms);
assertEquals(0, muc.getOccupantsCount(), "Expected room " + mucAddress + " to no longer have any occupants after it was destroyed (but it has).");
assertNull(muc.getNickname());
}