Class OXInstantMessagingIntegrationTest

    • 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