org.jivesoftware.smack
Class ReconnectionTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jivesoftware.smack.test.SmackTestCase
              extended by org.jivesoftware.smack.ReconnectionTest
All Implemented Interfaces:
junit.framework.Test

public class ReconnectionTest
extends SmackTestCase

Tests the connection and reconnection mechanism

Author:
Francisco Vives

Constructor Summary
ReconnectionTest(java.lang.String arg0)
           
 
Method Summary
 void testAnonymousReconnection()
          Tests a reconnection in a anonymously logged connection.
 void testAutomaticReconnection()
          Tests an automatic reconnection.
 void testAutomaticReconnectionWithCompression()
           
 void testCloseAndManualReconnection()
          Tests a manual reconnection after a login.
 void testManualReconnectionWithCancelation()
          Tests a manual reconnection.
 
Methods inherited from class org.jivesoftware.smack.test.SmackTestCase
assertEquals
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReconnectionTest

public ReconnectionTest(java.lang.String arg0)
Method Detail

testAutomaticReconnection

public void testAutomaticReconnection()
                               throws java.lang.Exception
Tests an automatic reconnection. Simulates a connection error and then waits until gets reconnected.

Throws:
java.lang.Exception

testAutomaticReconnectionWithCompression

public void testAutomaticReconnectionWithCompression()
                                              throws java.lang.Exception
Throws:
java.lang.Exception

testManualReconnectionWithCancelation

public void testManualReconnectionWithCancelation()
                                           throws java.lang.Exception
Tests a manual reconnection. Simulates a connection error, disables the reconnection mechanism and then reconnects.

Throws:
java.lang.Exception

testCloseAndManualReconnection

public void testCloseAndManualReconnection()
                                    throws java.lang.Exception
Tests a manual reconnection after a login. Closes the connection and then reconnects.

Throws:
java.lang.Exception

testAnonymousReconnection

public void testAnonymousReconnection()
                               throws java.lang.Exception
Tests a reconnection in a anonymously logged connection. Closes the connection and then reconnects.

Throws:
java.lang.Exception