Class RosterIntegrationTest

    • Method Detail

      • subscribeRequestListenerTest

        @SmackIntegrationTest
        public void subscribeRequestListenerTest()
                                          throws java.util.concurrent.TimeoutException,
                                                 java.lang.Exception
        Throws:
        java.util.concurrent.TimeoutException
        java.lang.Exception
      • testRosterPushAfterSubscriptionRequest

        @SmackIntegrationTest(section="3.1.2",
                              quote="After locally delivering or remotely routing the presence subscription request, the user\'s server MUST then send a roster push to all of the user\'s interested resources, containing the potential contact with a subscription state of \"none\" and with notation that the subscription is pending (via an \'ask\' attribute whose value is \"subscribe\").")
        public void testRosterPushAfterSubscriptionRequest()
                                                    throws java.lang.Exception
        Asserts that when a user sends out a presence subscription request, the server sends a roster push back to the user.
        Throws:
        java.lang.Exception - when errors occur
      • testPresenceDeliveredToRecipient

        @SmackIntegrationTest(section="3.1.3",
                              quote="if there is at least one available resource associated with the contact when the subscription request is received by the contact\'s server, then the contact\'s server MUST send that subscription request to all available resources in accordance with Section 8.")
        public void testPresenceDeliveredToRecipient()
                                              throws java.lang.Exception
        Asserts that when a user sends out a presence subscription request to an entity for which the user does not have a pre-existing subscription, the server will deliver the subscription request to that entity.
        Throws:
        java.lang.Exception - when errors occur
      • testPresenceApprovalStampedAndDelivered

        @SmackIntegrationTest(section="3.1.5",
                              quote="When the contact\'s client sends the subscription approval, the contact\'s server MUST stamp the outbound stanza with the bare JID <contact@domainpart> of the contact and locally deliver or remotely route the stanza to the user.")
        public void testPresenceApprovalStampedAndDelivered()
                                                     throws java.lang.Exception
        Asserts that when a user sends a presence subscription approval, the server stamps the bare JID of the sender, and delivers it to the requester.
        Throws:
        java.lang.Exception - when errors occur
      • testPresenceApprovalYieldsRosterPush

        @SmackIntegrationTest(section="3.1.5",
                              quote="The contact\'s server then MUST send an updated roster push to all of the contact\'s interested resources, with the \'subscription\' attribute set to a value of \"from\".")
        public void testPresenceApprovalYieldsRosterPush()
                                                  throws java.lang.Exception
        Asserts that when a user sends a presence subscription approval, the server sends a roster push to the user with a subscription 'from'.
        Throws:
        java.lang.Exception - when errors occur
      • testPresenceApprovalYieldsRosterPush2

        @SmackIntegrationTest(section="3.1.5",
                              quote="The contact\'s server then MUST send an updated roster push to all of the contact\'s interested resources, with the \'subscription\' attribute set to a value of \"from\". (Here we assume that the contact does not already have a subscription to the user; if that were the case, the \'subscription\' attribute would be set to a value of \"both\", as explained under Appendix A.)")
        public void testPresenceApprovalYieldsRosterPush2()
                                                   throws java.lang.Exception
        Asserts that when a user sends a presence subscription approval, the server sends a roster push to the user with a subscription 'both' when the contact already has a subscription to the other entity.
        Throws:
        java.lang.Exception - when errors occur
      • testCurrentPresenceSentAfterSubscriptionApproval

        @SmackIntegrationTest(section="3.1.5",
                              quote="The contact\'s server MUST then also send current presence to the user from each of the contact\'s available resources.")
        public void testCurrentPresenceSentAfterSubscriptionApproval()
                                                              throws java.lang.Exception
        Asserts that when a presence subscription request is approved, the server sends the latest presence of the now subscribed entity to the subscriber.
        Throws:
        java.lang.Exception - when errors occur
      • testReceivePresenceApprovalAndRosterPush

        @SmackIntegrationTest(section="3.1.6",
                              quote="(...)  If this check is successful, then the user\'s server MUST: 1. Deliver the inbound subscription approval to all of the user\'s interested resources (...). This MUST occur before sending the roster push described in the next step. 2. Initiate a roster push to all of the user\'s interested resources, containing an updated roster item for the contact with the \'subscription\' attribute set to a value of \"to\" (...) or \"both\" (...).")
        public void testReceivePresenceApprovalAndRosterPush()
                                                      throws java.lang.Exception
        Asserts that when a user receives a presence subscription approval, the server first sends the presence stanza, followed by a roster push.
        Throws:
        java.lang.Exception - when errors occur