org.jivesoftware.smackx.bytestreams.socks5
Class Socks5ClientForInitiatorTest

java.lang.Object
  extended by org.jivesoftware.smackx.bytestreams.socks5.Socks5ClientForInitiatorTest

public class Socks5ClientForInitiatorTest
extends java.lang.Object

Test for Socks5ClientForInitiator class.

Author:
Henning Staib

Constructor Summary
Socks5ClientForInitiatorTest()
           
 
Method Summary
 void cleanup()
          Reset default port for local SOCKS5 proxy.
 void setup()
          Initialize fields used in the tests.
 void shouldFailIfActivateSocks5ProxyFails()
          If the initiator can connect to a SOCKS5 proxy but activating the stream fails an exception should be thrown.
 void shouldFailIfTargetIsNotConnectedToLocalSocks5Proxy()
          If the target is not connected to the local SOCKS5 proxy an exception should be thrown.
 void shouldSuccessfullyConnectThroughLocalSocks5Proxy()
          Initiator and target should successfully connect to the local SOCKS5 proxy.
 void shouldSuccessfullyEstablishConnectionAndActivateSocks5Proxy()
          Target and initiator should successfully connect to a "remote" SOCKS5 proxy and the initiator activates the bytestream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Socks5ClientForInitiatorTest

public Socks5ClientForInitiatorTest()
Method Detail

setup

public void setup()
Initialize fields used in the tests.


shouldFailIfTargetIsNotConnectedToLocalSocks5Proxy

public void shouldFailIfTargetIsNotConnectedToLocalSocks5Proxy()
                                                        throws java.lang.Exception
If the target is not connected to the local SOCKS5 proxy an exception should be thrown.

Throws:
java.lang.Exception - should not happen

shouldSuccessfullyConnectThroughLocalSocks5Proxy

public void shouldSuccessfullyConnectThroughLocalSocks5Proxy()
                                                      throws java.lang.Exception
Initiator and target should successfully connect to the local SOCKS5 proxy.

Throws:
java.lang.Exception - should not happen

shouldFailIfActivateSocks5ProxyFails

public void shouldFailIfActivateSocks5ProxyFails()
                                          throws java.lang.Exception
If the initiator can connect to a SOCKS5 proxy but activating the stream fails an exception should be thrown.

Throws:
java.lang.Exception - should not happen

shouldSuccessfullyEstablishConnectionAndActivateSocks5Proxy

public void shouldSuccessfullyEstablishConnectionAndActivateSocks5Proxy()
                                                                 throws java.lang.Exception
Target and initiator should successfully connect to a "remote" SOCKS5 proxy and the initiator activates the bytestream.

Throws:
java.lang.Exception - should not happen

cleanup

public void cleanup()
Reset default port for local SOCKS5 proxy.