org.jivesoftware.smackx.bytestreams.socks5
Class Socks5ClientTest

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

public class Socks5ClientTest
extends java.lang.Object

Test for Socks5Client class.

Author:
Henning Staib

Constructor Summary
Socks5ClientTest()
           
 
Method Summary
 void cleanup()
          Close fake SOCKS5 proxy.
 void setup()
          Initialize fields used in the tests.
 void shouldCloseSocketIfServerDoesNotAcceptAuthenticationMethod()
          A SOCKS5 client MUST close connection if server doesn't accept any of the given authentication methods.
 void shouldCloseSocketIfServerRepliesInUnsupportedWay()
          The SOCKS5 client should close connection if server replies in an unsupported way.
 void shouldCloseSocketIfServerRepliesWithError()
          The SOCKS5 client should close connection if server replies with an error.
 void shouldSuccessfullyConnectToSocks5Server()
          The SOCKS5 client should successfully connect to the SOCKS5 server
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Socks5ClientTest

public Socks5ClientTest()
Method Detail

setup

public void setup()
           throws java.lang.Exception
Initialize fields used in the tests.

Throws:
java.lang.Exception - should not happen

shouldCloseSocketIfServerDoesNotAcceptAuthenticationMethod

public void shouldCloseSocketIfServerDoesNotAcceptAuthenticationMethod()
                                                                throws java.lang.Exception
A SOCKS5 client MUST close connection if server doesn't accept any of the given authentication methods. (See RFC1928 Section 3)

Throws:
java.lang.Exception - should not happen

shouldCloseSocketIfServerRepliesInUnsupportedWay

public void shouldCloseSocketIfServerRepliesInUnsupportedWay()
                                                      throws java.lang.Exception
The SOCKS5 client should close connection if server replies in an unsupported way.

Throws:
java.lang.Exception - should not happen

shouldCloseSocketIfServerRepliesWithError

public void shouldCloseSocketIfServerRepliesWithError()
                                               throws java.lang.Exception
The SOCKS5 client should close connection if server replies with an error.

Throws:
java.lang.Exception - should not happen

shouldSuccessfullyConnectToSocks5Server

public void shouldSuccessfullyConnectToSocks5Server()
                                             throws java.lang.Exception
The SOCKS5 client should successfully connect to the SOCKS5 server

Throws:
java.lang.Exception - should not happen

cleanup

public void cleanup()
             throws java.lang.Exception
Close fake SOCKS5 proxy.

Throws:
java.lang.Exception - should not happen