mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 11:38:00 +01:00
[sinttest] Improve test assertion message
Making use of the new assertion handling for MultiResultSyncPoint, the integration test that uses that implementation can now get improved assertion messages. This will allow users to more quickly determine why a test is failing.
This commit is contained in:
parent
440b497638
commit
7e9a5713e9
1 changed files with 2 additions and 2 deletions
|
@ -293,10 +293,10 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI
|
|||
try {
|
||||
mucAsSeenByThree.join(nicknameThree);
|
||||
|
||||
List<Presence> results = syncPoint.waitForResults(timeout);
|
||||
List<Presence> results = assertResult(syncPoint, "Expected all occupants of room '" + mucAddress + "' to be notified of '" + conThree.getUser() + "' using nickname '" + nicknameThree + "' joining the room (but one or more did not get notified).");
|
||||
assertTrue(results.stream().allMatch(
|
||||
result -> JidCreate.fullFrom(mucAddress, nicknameThree).equals(result.getFrom())),
|
||||
"Expected all occupants of room '" + mucAddress + "' to be notified of '" + conThree.getUser() + "' using nickname '" + nicknameThree + "' joining the room (but one or more got notified ).");
|
||||
"Expected all occupants of room '" + mucAddress + "' to be notified of '" + conThree.getUser() + "' using nickname '" + nicknameThree + "' joining the room (but one or more got notified for a different user).");
|
||||
assertTrue(results.stream().anyMatch(
|
||||
result -> result.getTo().equals(conOne.getUser().asEntityFullJidIfPossible())),
|
||||
"Expected '" + conOne.getUser().asEntityFullJidIfPossible() + "' to be notified of '" + conThree.getUser() + "' joining room '" + mucAddress + "' (but did not)");
|
||||
|
|
Loading…
Reference in a new issue