Package org.jivesoftware.smackx.muc
Class MultiUserChatRolesAffiliationsPrivilegesIntegrationTest
java.lang.Object
org.igniterealtime.smack.inttest.AbstractSmackIntTest
org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
org.jivesoftware.smackx.muc.AbstractMultiUserChatIntegrationTest
org.jivesoftware.smackx.muc.MultiUserChatRolesAffiliationsPrivilegesIntegrationTest
@SpecificationReference(document="XEP-0045",
version="1.34.6")
public class MultiUserChatRolesAffiliationsPrivilegesIntegrationTest
extends AbstractMultiUserChatIntegrationTest
-
Nested Class Summary
Nested classes/interfaces inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
AbstractSmackIntTest.Condition
-
Field Summary
Fields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
connection, connections, conOne, conThree, conTwo
Fields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
INSECURE_RANDOM, LOGGER, sinttestConfiguration, testRunId, timeout
-
Constructor Summary
ConstructorDescriptionMultiUserChatRolesAffiliationsPrivilegesIntegrationTest
(SmackIntegrationTestEnvironment environment) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Asserts that a user who undergoes an affiliation change receives that change as a presence update.void
Asserts that a user who undergoes an affiliation change receives that change as a presence update.void
Asserts that a user who is present when another user undergoes an affiliation change receives that change as a presence update.void
Asserts that a user who is present when another user undergoes an affiliation change receives that change as a presence updatevoid
Asserts that a user who gets kicked receives that change as a presence update.void
Asserts that a user who is present when another user gets kicked receives that change as a presence update.void
Asserts that a user who undergoes a role change receives that change as a presence update.void
Asserts that a user who undergoes a role change receives that change as a presence update.void
Asserts that a user in an unmoderated room who undergoes an affiliation change receives that change as a presence update.void
Asserts that a user who is present when another user undergoes a role change receives that change as a presence update.void
Asserts that a user who is present when another user undergoes a role change receives that change as a presence update.void
Asserts that a user who is present when another user undergoes a role change receives that change as a presence update.void
Asserts that a members-only room assigns the correct default roles for a given affiliation.void
Asserts that a moderated room assigns the correct default roles for a given affiliation.void
Asserts that an unmoderated room assigns the correct default roles for a given affiliation.void
Asserts that a moderator cannot revoke moderator privileges from a moderator with a higher affiliation than themselves.void
Asserts that a moderator cannot revoke voice from an owner.void
Asserts that an affiliation is persistent between visits to the room.Methods inherited from class org.jivesoftware.smackx.muc.AbstractMultiUserChatIntegrationTest
getRandomRoom
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
performActionAndWaitForPresence
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
assertResult, assertResult, assertResult, assertResult, createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrue
-
Constructor Details
-
MultiUserChatRolesAffiliationsPrivilegesIntegrationTest
public MultiUserChatRolesAffiliationsPrivilegesIntegrationTest(SmackIntegrationTestEnvironment environment) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException, TestNotPossibleException, org.jivesoftware.smackx.muc.MultiUserChatException.MucAlreadyJoinedException, org.jivesoftware.smackx.muc.MultiUserChatException.MissingMucCreationAcknowledgeException, org.jivesoftware.smackx.muc.MultiUserChatException.NotAMucServiceException, org.jxmpp.stringprep.XmppStringprepException - Throws:
org.jivesoftware.smack.SmackException.NoResponseException
org.jivesoftware.smack.XMPPException.XMPPErrorException
org.jivesoftware.smack.SmackException.NotConnectedException
InterruptedException
TestNotPossibleException
org.jivesoftware.smackx.muc.MultiUserChatException.MucAlreadyJoinedException
org.jivesoftware.smackx.muc.MultiUserChatException.MissingMucCreationAcknowledgeException
org.jivesoftware.smackx.muc.MultiUserChatException.NotAMucServiceException
org.jxmpp.stringprep.XmppStringprepException
-
-
Method Details
-
mucRoleTestForReceivingModerator
@SmackIntegrationTest(section="5.1.3", quote="(\u00a7 5.1.3)... a MUC service implementation MUST change the occupant\'s role to reflect the change and communicate the change to all occupants [...] (\u00a7 9.6) The service MUST then send updated presence from this individual to all occupants, indicating the addition of moderator status...") public void mucRoleTestForReceivingModerator() throws ExceptionAsserts that a user who undergoes a role change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucRoleTestForWitnessingModerator
@SmackIntegrationTest(section="9.6", quote="(\u00a7 5.1.3)... a MUC service implementation MUST change the occupant\'s role to reflect the change and communicate the change to all occupants [...] (\u00a7 9.6) The service MUST then send updated presence from this individual to all occupants, indicating the addition of moderator status...") public void mucRoleTestForWitnessingModerator() throws ExceptionAsserts that a user who is present when another user undergoes a role change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucRoleTestForRemovingModerator
@SmackIntegrationTest(section="5.1.3", quote="(\u00a7 5.1.3)... a MUC service implementation MUST change the occupant\'s role to reflect the change and communicate the change to all occupants [...] (\u00a7 9.7) The service MUST then send updated presence from this individual to all occupants, indicating the removal of moderator status...") public void mucRoleTestForRemovingModerator() throws ExceptionAsserts that a user who undergoes a role change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucRoleTestForWitnessingModeratorRemoval
@SmackIntegrationTest(section="9.7", quote="(\u00a7 5.1.3)... a MUC service implementation MUST change the occupant\'s role to reflect the change and communicate the change to all occupants [...] (\u00a7 9.7) The service MUST then send updated presence from this individual to all occupants, indicating the removal of moderator status...") public void mucRoleTestForWitnessingModeratorRemoval() throws ExceptionAsserts that a user who is present when another user undergoes a role change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucRoleTestForRevokingVoice
@SmackIntegrationTest(section="5.1.3", quote="(\u00a7 5.1.3)... a MUC service implementation MUST change the occupant\'s role to reflect the change and communicate the change to all occupants [...] (\u00a7 8.4) The service MUST then send updated presence from this individual to all occupants, indicating the removal of voice privileges...") public void mucRoleTestForRevokingVoice() throws ExceptionAsserts that a user in an unmoderated room who undergoes an affiliation change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucRoleTestForWitnessingRevokingVoice
@SmackIntegrationTest(section="8.4", quote="(\u00a7 5.1.3)... a MUC service implementation MUST change the occupant\'s role to reflect the change and communicate the change to all occupants [...] (\u00a7 8.4) The service MUST then send updated presence from this individual to all occupants, indicating the removal of voice privileges...") public void mucRoleTestForWitnessingRevokingVoice() throws ExceptionAsserts that a user who is present when another user undergoes a role change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucAffiliationTestForReceivingAdmin
@SmackIntegrationTest(section="5.2.2", quote="(\u00a7 5.2.2) ... a MUC service implementation MUST change the user\'s affiliation to reflect the change and communicate that to all occupants [...] (\u00a7 10.6) If the user is in the room, the service MUST then send updated presence from this individual to all occupants, indicating the granting of admin status...") public void mucAffiliationTestForReceivingAdmin() throws ExceptionAsserts that a user who undergoes an affiliation change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucAffiliationTestForWitnessingAdmin
@SmackIntegrationTest(section="10.6", quote="(\u00a7 5.2.2) ... a MUC service implementation MUST change the user\'s affiliation to reflect the change and communicate that to all occupants [...] (\u00a7 10.6) If the user is in the room, the service MUST then send updated presence from this individual to all occupants, indicating the granting of admin status...") public void mucAffiliationTestForWitnessingAdmin() throws ExceptionAsserts that a user who is present when another user undergoes an affiliation change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucAffiliationTestForRemovingAdmin
@SmackIntegrationTest(section="10.7", quote="(\u00a7 5.2.2) ... a MUC service implementation MUST change the user\'s affiliation to reflect the change and communicate that to all occupants [...] (\u00a7 10.6) If the user is in the room, the service MUST then send updated presence from this individual to all occupants, indicating the loss of admin status by sending a presence element...") public void mucAffiliationTestForRemovingAdmin() throws ExceptionAsserts that a user who undergoes an affiliation change receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucAffiliationTestForWitnessingAdminRemoval
@SmackIntegrationTest(section="10.7", quote="(\u00a7 5.2.2) ... a MUC service implementation MUST change the user\'s affiliation to reflect the change and communicate that to all occupants [...] (\u00a7 10.6) If the user is in the room, the service MUST then send updated presence from this individual to all occupants, indicating the loss of admin status by sending a presence element...") public void mucAffiliationTestForWitnessingAdminRemoval() throws ExceptionAsserts that a user who is present when another user undergoes an affiliation change receives that change as a presence updateFrom XEP-0045 § 5.2.2:
...a MUC service implementation MUST change the user's affiliation to reflect the change and communicate that to all occupants...
From XEP-0045 § 10.7:
If the user is in the room, the service MUST then send updated presence from this individual to all occupants, indicating the loss of admin status by sending a presence element...
- Throws:
Exception
- when errors occur
-
mucPresenceTestForGettingKicked
@SmackIntegrationTest(section="8.2", quote="The kick is performed based on the occupant\'s room nickname and is completed by setting the role of a participant or visitor to a value of \"none\". The service MUST remove the kicked occupant by sending a presence stanza of type \"unavailable\" to each kicked occupant, including status code 307 in the extended presence information, optionally along with the reason (if provided) and the roomnick or bare JID of the user who initiated the kick.") public void mucPresenceTestForGettingKicked() throws ExceptionAsserts that a user who gets kicked receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucPresenceTestForWitnessingKick
@SmackIntegrationTest(section="8.2", quote="...the service MUST then inform all of the remaining occupants that the kicked occupant is no longer in the room by sending presence stanzas of type \"unavailable\" from the individual\'s roomnick (<room@service/nick>) to all the remaining occupants (just as it does when occupants exit the room of their own volition), including the status code and optionally the reason and actor.") public void mucPresenceTestForWitnessingKick() throws ExceptionAsserts that a user who is present when another user gets kicked receives that change as a presence update.- Throws:
Exception
- when errors occur
-
mucTestPersistentAffiliation
@SmackIntegrationTest(section="5.2", quote="These affiliations are long-lived in that they persist across a user\'s visits to the room and are not affected by happenings in the room...Affiliations are granted, revoked, and maintained based on the user\'s bare JID, not the nick as with roles.") public void mucTestPersistentAffiliation() throws ExceptionAsserts that an affiliation is persistent between visits to the room.- Throws:
Exception
- when errors occur
-
mucTestModeratorCannotRevokeVoiceFromOwner
@SmackIntegrationTest(section="5.1.1", quote="A moderator MUST NOT be able to revoke voice privileges from an admin or owner [...] (\u00a7 8.4) A moderator MUST NOT be able to revoke voice from a user whose affiliation is at or above the moderator\'s level. In addition, a service MUST NOT allow the voice privileges of an admin or owner to be removed by anyone. If a moderator attempts to revoke voice privileges from such a user, the service MUST deny the request and return a <not-allowed/> error to the sender along with the offending item(s)") public void mucTestModeratorCannotRevokeVoiceFromOwner() throws ExceptionAsserts that a moderator cannot revoke voice from an owner.- Throws:
Exception
- when errors occur
-
mucTestModeratorCannotBeRevokedFromHigherAffiliation
@SmackIntegrationTest(section="5.1.3", quote="A moderator SHOULD NOT be allowed to revoke moderation privileges from someone with a higher affiliation than themselves (i.e., an unaffiliated moderator SHOULD NOT be allowed to revoke moderation privileges from an admin or an owner, and an admin SHOULD NOT be allowed to revoke moderation privileges from an owner)") public void mucTestModeratorCannotBeRevokedFromHigherAffiliation() throws ExceptionAsserts that a moderator cannot revoke moderator privileges from a moderator with a higher affiliation than themselves.- Throws:
Exception
- when errors occur
-
mucTestDefaultRoleForAffiliationInUnmoderatedRoom
@SmackIntegrationTest(section="5.1.2", quote="...the initial default roles that a service SHOULD set based on the user\'s affiliation...") public void mucTestDefaultRoleForAffiliationInUnmoderatedRoom() throws ExceptionAsserts that an unmoderated room assigns the correct default roles for a given affiliation.- Throws:
Exception
- when errors occur
-
mucTestDefaultRoleForAffiliationInModeratedRoom
@SmackIntegrationTest(section="5.1.2", quote="...the initial default roles that a service SHOULD set based on the user\'s affiliation...") public void mucTestDefaultRoleForAffiliationInModeratedRoom() throws ExceptionAsserts that a moderated room assigns the correct default roles for a given affiliation.- Throws:
Exception
- when errors occur
-
mucTestDefaultRoleForAffiliationInMembersOnlyRoom
@SmackIntegrationTest(section="5.1.2", quote="...the initial default roles that a service SHOULD set based on the user\'s affiliation...") public void mucTestDefaultRoleForAffiliationInMembersOnlyRoom() throws ExceptionAsserts that a members-only room assigns the correct default roles for a given affiliation.- Throws:
Exception
- when errors occur
-