Class MultiUserChatRolesAffiliationsPrivilegesIntegrationTest


@SpecificationReference(document="XEP-0045", version="1.34.6") public class MultiUserChatRolesAffiliationsPrivilegesIntegrationTest extends AbstractMultiUserChatIntegrationTest
  • 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts that a user who is present when another user undergoes an affiliation change receives that change as a presence update

      From 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts 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 Exception
      Asserts that a members-only room assigns the correct default roles for a given affiliation.
      Throws:
      Exception - when errors occur