org.jivesoftware.smackx.bytestreams.socks5
Class Socks5ByteStreamTest

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

public class Socks5ByteStreamTest
extends SmackTestCase

Test for Socks5 bytestreams with real XMPP servers.

Author:
Henning Staib

Constructor Summary
Socks5ByteStreamTest(java.lang.String arg0)
          Constructor
 
Method Summary
 void testBiDirectionalSocks5BytestreamWithRemoteSocks5Proxy()
          Socks5 bytestream should be successfully established using a Socks5 proxy provided by the XMPP server.
 void testInitializationSocks5FeaturesAndListenerOnStartup()
          Socks5 feature should be added to the service discovery on Smack startup.
 void testRespondWithErrorOnSocks5BytestreamRequest()
          Target should respond with not-acceptable error if no listeners for incoming Socks5 bytestream requests are registered.
 void testSocks5BytestreamWithLocalSocks5Proxy()
          Socks5 bytestream should be successfully established using the local Socks5 proxy.
 void testSocks5BytestreamWithRemoteSocks5Proxy()
          Socks5 bytestream should be successfully established using a Socks5 proxy provided by the XMPP server.
 
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

Socks5ByteStreamTest

public Socks5ByteStreamTest(java.lang.String arg0)
Constructor

Parameters:
arg0 -
Method Detail

testInitializationSocks5FeaturesAndListenerOnStartup

public void testInitializationSocks5FeaturesAndListenerOnStartup()
                                                          throws XMPPException
Socks5 feature should be added to the service discovery on Smack startup.

Throws:
XMPPException - should not happen

testRespondWithErrorOnSocks5BytestreamRequest

public void testRespondWithErrorOnSocks5BytestreamRequest()
                                                   throws XMPPException
Target should respond with not-acceptable error if no listeners for incoming Socks5 bytestream requests are registered.

Throws:
XMPPException - should not happen

testSocks5BytestreamWithLocalSocks5Proxy

public void testSocks5BytestreamWithLocalSocks5Proxy()
                                              throws java.lang.Exception
Socks5 bytestream should be successfully established using the local Socks5 proxy.

Throws:
java.lang.Exception - should not happen

testSocks5BytestreamWithRemoteSocks5Proxy

public void testSocks5BytestreamWithRemoteSocks5Proxy()
                                               throws java.lang.Exception
Socks5 bytestream should be successfully established using a Socks5 proxy provided by the XMPP server.

This test will fail if the XMPP server doesn't provide any Socks5 proxies or the Socks5 proxy only allows Socks5 bytestreams in the context of a file transfer (like Openfire in default configuration, see xmpp.proxy.transfer.required flag).

Throws:
java.lang.Exception - if no Socks5 proxies found or proxy is unwilling to activate Socks5 bytestream

testBiDirectionalSocks5BytestreamWithRemoteSocks5Proxy

public void testBiDirectionalSocks5BytestreamWithRemoteSocks5Proxy()
                                                            throws java.lang.Exception
Socks5 bytestream should be successfully established using a Socks5 proxy provided by the XMPP server. The established connection should transfer data bidirectional if the Socks5 proxy supports it.

Support for bidirectional Socks5 bytestream:

This test will fail if the XMPP server doesn't provide any Socks5 proxies or the Socks5 proxy only allows Socks5 bytestreams in the context of a file transfer (like Openfire in default configuration, see xmpp.proxy.transfer.required flag).

Throws:
java.lang.Exception - if no Socks5 proxies found or proxy is unwilling to activate Socks5 bytestream