mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
In tests, use specific assertion implementation
These generate more helpful error messages when assertions fail and help to show intent.
This commit is contained in:
parent
5782fff2a4
commit
a809f181f5
1 changed files with 8 additions and 6 deletions
|
@ -16,7 +16,9 @@
|
||||||
*/
|
*/
|
||||||
package org.jivesoftware.smackx.muc;
|
package org.jivesoftware.smackx.muc;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -144,9 +146,9 @@ public class MultiUserChatIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
|
|
||||||
muc.addUserStatusListener(userStatusListener);
|
muc.addUserStatusListener(userStatusListener);
|
||||||
|
|
||||||
assertTrue(mucManagerOne.getJoinedRooms().size() == 1);
|
assertEquals(1, mucManagerOne.getJoinedRooms().size());
|
||||||
assertTrue(muc.getOccupantsCount() == 1);
|
assertEquals(1, muc.getOccupantsCount());
|
||||||
assertTrue(muc.getNickname() != null);
|
assertNotNull(muc.getNickname());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
muc.destroy("Dummy reason", null);
|
muc.destroy("Dummy reason", null);
|
||||||
|
@ -155,8 +157,8 @@ public class MultiUserChatIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
muc.removeUserStatusListener(userStatusListener);
|
muc.removeUserStatusListener(userStatusListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
assertTrue(mucManagerOne.getJoinedRooms().size() == 0);
|
assertEquals(0, mucManagerOne.getJoinedRooms().size());
|
||||||
assertTrue(muc.getOccupantsCount() == 0);
|
assertEquals(0, muc.getOccupantsCount());
|
||||||
assertTrue(muc.getNickname() == null);
|
assertNull(muc.getNickname());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue