NetworkAssert¶
-
public class
NetworkAssert
¶ The
NetworkAssert
isAuthor: Twinsen Tsang
Methods¶
assertSocketNonReachable¶
-
public static void
assertSocketNonReachable
(String host, int port, int timeout)¶ Assert whether the server socket with
host
andport
is reachable with the time limittimeout
.Parameters: - message – The customized error message when the assertion failed.
- host – The host of the server socket binds to.
- port – The port of the server socket binds to .
- timeout – How long does this assert think it is time out, ie failed to connect.
assertSocketNonReachable¶
-
public static void
assertSocketNonReachable
(String message, String host, int port, int timeout)¶ Assert whether the server socket with
host
andport
is reachable with the time limittimeout
.Parameters: - host – The host of the server socket binds to.
- port – The port of the server socket binds to .
- timeout – How long does this assert think it is time out, ie failed to connect.
assertSocketReachable¶
-
public static void
assertSocketReachable
(String host, int port, int timeout)¶ Assert whether the server socket with
host
andport
is reachable with the time limittimeout
.Parameters: - host – The host of the server socket binds to.
- port – The port of the server socket binds to .
- timeout – How long does this assert think it is time out, ie failed to connect.
assertSocketReachable¶
-
public static void
assertSocketReachable
(String message, String host, int port, int timeout)¶ Assert whether the server socket with
host
andport
is reachable with the time limittimeout
.Parameters: - message – The customized error message when the assertion failed.
- host – The host of the server socket binds to.
- port – The port of the server socket binds to .
- timeout – How long does this assert think it is time out, ie failed to connect.