1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 05:52:06 +01:00

[sinttest] Do not use Java stream() API to check if MUC status is set

MUCUser.getStatus() returns a set, checking if a particular MUC status
number is set should be done via a simple and efficient set operation
and not by resorting to using Java's stream API.
This commit is contained in:
Florian Schmaus 2024-05-20 22:06:56 +02:00
parent 482a117e0d
commit 2a243fe3b6

View file

@ -932,7 +932,7 @@ public class MultiUserChatOccupantIntegrationTest extends AbstractMultiUserChatI
.submitConfigurationForm(); .submitConfigurationForm();
Presence twoPresence = mucAsSeenByTwo.join(nicknameTwo); Presence twoPresence = mucAsSeenByTwo.join(nicknameTwo);
assertTrue(MUCUser.from(twoPresence).getStatus().stream().anyMatch(status -> 170 == status.getCode()), assertTrue(MUCUser.from(twoPresence).getStatus().contains(MUCUser.Status.create(170)),
"Expected initial presence reflected to '" + conTwo.getUser() + "' when joining room '" + mucAddress + "' to include the status code '170' (but it did not)."); "Expected initial presence reflected to '" + conTwo.getUser() + "' when joining room '" + mucAddress + "' to include the status code '170' (but it did not).");
} catch (MucConfigurationNotSupportedException e) { } catch (MucConfigurationNotSupportedException e) {
throw new TestNotPossibleException(e); throw new TestNotPossibleException(e);