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, conTwo
-
Fields inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
INSECURE_RANDOM, LOGGER, sinttestConfiguration, testRunId, timeout
-
-
Constructor Summary
Constructors Constructor Description RosterIntegrationTest(SmackIntegrationTestEnvironment environment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsubscribeRequestListenerTest()voidtestCurrentPresenceSentAfterSubscriptionApproval()Asserts that when a presence subscription request is approved, the server sends the latest presence of the now subscribed entity to the subscriber.voidtestPresenceApprovalStampedAndDelivered()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.voidtestPresenceApprovalYieldsRosterPush()Asserts that when a user sends a presence subscription approval, the server sends a roster push to the user with a subscription 'from'.voidtestPresenceApprovalYieldsRosterPush2()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.voidtestPresenceDeliveredToRecipient()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.voidtestRosterPushAfterSubscriptionRequest()Asserts 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
performActionAndWaitForPresence
-
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
assertResult, assertResult, assertResult, assertResult, createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrue
-
-
-
-
Constructor Detail
-
RosterIntegrationTest
public RosterIntegrationTest(SmackIntegrationTestEnvironment environment)
-
-
Method Detail
-
subscribeRequestListenerTest
@SmackIntegrationTest public void subscribeRequestListenerTest() throws java.util.concurrent.TimeoutException, java.lang.Exception
- Throws:
java.util.concurrent.TimeoutExceptionjava.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
-
-