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") 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
Constructors Constructor Description OXInstantMessagingIntegrationTest(SmackIntegrationTestEnvironment environment)
This integration test tests basic OX message exchange.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
basicInstantMessagingTest()
static void
deleteStore()
-
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest
performActionAndWaitForPresence
-
Methods inherited from class org.igniterealtime.smack.inttest.AbstractSmackIntTest
assertResult, assertResult, createNewTempFile, getHttpUrlConnectionFor, performActionAndWaitUntilStanzaReceived, waitUntilTrue
-
-
-
-
Constructor Detail
-
OXInstantMessagingIntegrationTest
public OXInstantMessagingIntegrationTest(SmackIntegrationTestEnvironment environment) throws org.jivesoftware.smack.XMPPException.XMPPErrorException, java.lang.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.java.lang.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 Detail
-
deleteStore
@BeforeClass @AfterClass public static void deleteStore() throws java.io.IOException
- Throws:
java.io.IOException
-
basicInstantMessagingTest
@SmackIntegrationTest public void basicInstantMessagingTest() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-