Package org.jivesoftware.smack.roster
Class RosterIntegrationTest
java.lang.Object
org.igniterealtime.smack.inttest.AbstractSmackIntTest
org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
org.jivesoftware.smack.roster.RosterIntegrationTest
@SpecificationReference(document="RFC6121")
public class RosterIntegrationTest
extends AbstractSmackIntegrationTest
-
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, conTwoFields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
INSECURE_RANDOM, LOGGER, sinttestConfiguration, testRunId, timeout -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAsserts that when a presence subscription request is approved, the server sends the latest presence of the now subscribed entity to the subscriber.voidAsserts that when a user sends a presence subscription approval, the server stamps the bare JID of the sender, and delivers it to the requester.voidAsserts that when a user sends a presence subscription approval, the server sends a roster push to the user with a subscription 'from'.voidAsserts 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.voidAsserts 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.voidAsserts that when a user sends out a presence subscription request, the server sends a roster push back to the user.Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
performActionAndWaitForPresenceMethods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
assertResult, assertResult, assertResult, assertResult, createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrue
-
Constructor Details
-
RosterIntegrationTest
-
-
Method Details
-
subscribeRequestListenerTest
- Throws:
TimeoutExceptionException
-
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 ExceptionAsserts that when a user sends out a presence subscription request, the server sends a roster push back to the user.- Throws:
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 ExceptionAsserts 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:
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 ExceptionAsserts 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:
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 ExceptionAsserts that when a user sends a presence subscription approval, the server sends a roster push to the user with a subscription 'from'.- Throws:
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 ExceptionAsserts 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:
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 ExceptionAsserts that when a presence subscription request is approved, the server sends the latest presence of the now subscribed entity to the subscriber.- Throws:
Exception- when errors occur
-