Package org.jivesoftware.smackx.ox_im
Class OXInstantMessagingIntegrationTest
java.lang.Object
org.igniterealtime.smack.inttest.AbstractSmackIntTest
org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
org.jivesoftware.smackx.ox.AbstractOpenPgpIntegrationTest
org.jivesoftware.smackx.ox_im.OXInstantMessagingIntegrationTest
@SpecificationReference(document="XEP-0374",
version="0.2.0")
public class OXInstantMessagingIntegrationTest
extends AbstractOpenPgpIntegrationTest
-
Nested Class Summary
Nested classes/interfaces inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
AbstractSmackIntTest.Condition
-
Field Summary
Fields inherited from class org.jivesoftware.smackx.ox.AbstractOpenPgpIntegrationTest
alice, aliceConnection, alicePepManager, bob, bobConnection, bobPepManager, chloe, chloeConnection, chloePepManager
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
ConstructorDescriptionThis integration test tests basic OX message exchange. -
Method Summary
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
-
OXInstantMessagingIntegrationTest
public OXInstantMessagingIntegrationTest(SmackIntegrationTestEnvironment environment) throws org.jivesoftware.smack.XMPPException.XMPPErrorException, InterruptedException, org.jivesoftware.smack.SmackException.NotConnectedException, TestNotPossibleException, org.jivesoftware.smack.SmackException.NoResponseException This integration test tests basic OX message exchange. In this scenario, Alice and Bob are strangers, as they do not have subscribed to one another. Alice (conOne) creates keys and publishes them to the server. Bob (conTwo) creates keys and publishes them to the server. Alice then manually fetches Bobs metadata node and all announced keys. Alice trusts Bobs keys and vice versa (even though Bob does not have copies of Alice' keys yet). She proceeds to create an OX encrypted message, which is encrypted to Bob and herself and signed by her. She sends the message. Bob receives the message, which - due to missing keys - triggers him to update Alice' keys. After the update Bob proceeds to decrypt and verify the message. After the test, the keys are deleted from local storage and from PubSub.- Parameters:
environment
- test environment- Throws:
org.jivesoftware.smack.XMPPException.XMPPErrorException
- if there was an XMPP error returned.InterruptedException
- if the calling thread was interrupted.org.jivesoftware.smack.SmackException.NotConnectedException
- if the XMPP connection is not connected.TestNotPossibleException
- if the test is not possible due to lacking server support for PEP.org.jivesoftware.smack.SmackException.NoResponseException
- if there was no response from the remote entity.
-
-
Method Details
-
deleteStore
- Throws:
IOException
-
basicInstantMessagingTest
- Throws:
Exception
-