|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jivesoftware.smackx.bytestreams.socks5.Socks5ByteStreamManagerTest
public class Socks5ByteStreamManagerTest
Test for Socks5BytestreamManager.
| Constructor Summary | |
|---|---|
Socks5ByteStreamManagerTest()
|
|
| Method Summary | |
|---|---|
void |
cleanUp()
Stop eventually started local SOCKS5 test proxy. |
void |
setup()
Initialize fields used in the tests. |
void |
shouldBlacklistNonSocks5Proxies()
Invoking Socks5BytestreamManager.establishSession(String, String) should fail if no
SOCKS5 proxy can be found. |
void |
shouldDisableService()
The SOCKS5 Bytestream feature should be removed form the service discovery manager if Socks5 bytestream feature is disabled. |
void |
shouldFailIfInitiatorCannotConnectToSocks5Proxy()
Invoking Socks5BytestreamManager.establishSession(String, String) should fail if
initiator can not connect to the SOCKS5 proxy used by target. |
void |
shouldFailIfNoSocks5ProxyFound1()
Invoking Socks5BytestreamManager.establishSession(String, String) should fail if XMPP
server doesn't return any proxies. |
void |
shouldFailIfNoSocks5ProxyFound2()
Invoking Socks5BytestreamManager.establishSession(String, String) should fail if no
proxy is a SOCKS5 proxy. |
void |
shouldFailIfTargetDoesNotAcceptSocks5Bytestream()
Invoking Socks5BytestreamManager.establishSession(String, String) should fail if the
target does not accept a SOCKS5 Bytestream. |
void |
shouldFailIfTargetDoesNotSupportSocks5()
Invoking Socks5BytestreamManager.establishSession(String) should throw an exception
if the given target does not support SOCKS5 Bytestream. |
void |
shouldFailIfTargetUsesInvalidSocks5Proxy()
Invoking Socks5BytestreamManager.establishSession(String, String) should fail if the
proxy used by target is invalid. |
void |
shouldHaveOneManagerForEveryConnection()
Test that Socks5BytestreamManager.getBytestreamManager(Connection) returns one
bytestream manager for every connection |
void |
shouldNegotiateSocks5BytestreamAndTransferData()
Invoking Socks5BytestreamManager.establishSession(String, String) should successfully
negotiate and return a SOCKS5 Bytestream connection. |
void |
shouldNotPrioritizeSocks5ProxyIfPrioritizationDisabled()
Invoking Socks5BytestreamManager.establishSession(String, String) the first time
should successfully negotiate a SOCKS5 Bytestream via the second SOCKS5 proxy. |
void |
shouldPrioritizeSecondSocks5ProxyOnSecondAttempt()
Invoking Socks5BytestreamManager.establishSession(String, String) the first time
should successfully negotiate a SOCKS5 Bytestream via the second SOCKS5 proxy and should
prioritize this proxy for a second SOCKS5 Bytestream negotiation. |
void |
shouldUseMultipleAddressesForLocalSocks5Proxy()
If multiple network addresses are added to the local SOCKS5 proxy, all of them should be contained in the SOCKS5 Bytestream request. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Socks5ByteStreamManagerTest()
| Method Detail |
|---|
public void setup()
public void shouldHaveOneManagerForEveryConnection()
Socks5BytestreamManager.getBytestreamManager(Connection) returns one
bytestream manager for every connection
public void shouldDisableService()
public void shouldFailIfTargetDoesNotSupportSocks5()
Socks5BytestreamManager.establishSession(String) should throw an exception
if the given target does not support SOCKS5 Bytestream.
public void shouldFailIfNoSocks5ProxyFound1()
Socks5BytestreamManager.establishSession(String, String) should fail if XMPP
server doesn't return any proxies.
public void shouldFailIfNoSocks5ProxyFound2()
Socks5BytestreamManager.establishSession(String, String) should fail if no
proxy is a SOCKS5 proxy.
public void shouldBlacklistNonSocks5Proxies()
Socks5BytestreamManager.establishSession(String, String) should fail if no
SOCKS5 proxy can be found. If it turns out that a proxy is not a SOCKS5 proxy it should not
be queried again.
public void shouldFailIfTargetDoesNotAcceptSocks5Bytestream()
Socks5BytestreamManager.establishSession(String, String) should fail if the
target does not accept a SOCKS5 Bytestream. See XEP-0065 Section 5.2 A2
public void shouldFailIfTargetUsesInvalidSocks5Proxy()
Socks5BytestreamManager.establishSession(String, String) should fail if the
proxy used by target is invalid.
public void shouldFailIfInitiatorCannotConnectToSocks5Proxy()
Socks5BytestreamManager.establishSession(String, String) should fail if
initiator can not connect to the SOCKS5 proxy used by target.
public void shouldNegotiateSocks5BytestreamAndTransferData()
throws java.lang.Exception
Socks5BytestreamManager.establishSession(String, String) should successfully
negotiate and return a SOCKS5 Bytestream connection.
java.lang.Exception - should not happen
public void shouldUseMultipleAddressesForLocalSocks5Proxy()
throws java.lang.Exception
java.lang.Exception - should not happen
public void shouldPrioritizeSecondSocks5ProxyOnSecondAttempt()
throws java.lang.Exception
Socks5BytestreamManager.establishSession(String, String) the first time
should successfully negotiate a SOCKS5 Bytestream via the second SOCKS5 proxy and should
prioritize this proxy for a second SOCKS5 Bytestream negotiation.
java.lang.Exception - should not happen
public void shouldNotPrioritizeSocks5ProxyIfPrioritizationDisabled()
throws java.lang.Exception
Socks5BytestreamManager.establishSession(String, String) the first time
should successfully negotiate a SOCKS5 Bytestream via the second SOCKS5 proxy. The second
negotiation should run in the same manner if prioritization is disabled.
java.lang.Exception - should not happenpublic void cleanUp()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||