|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--com.eyebolt.iplib.ClientTest
Test iplib
Inner Class Summary | |
(package private) class |
ClientTest.Receiver
|
(package private) class |
ClientTest.TopCallback
|
Field Summary | |
(package private) IPAddress |
address
|
(package private) java.util.Date |
createDate
|
(package private) long |
failed
|
(package private) IPManager |
ipmanager
|
(package private) IPKey |
key
|
private int |
LEVEL_INFO
|
private int |
LEVEL_TRACE
|
static int |
LOOPBACK_LISTEN_PORT
Description of the Field |
static int |
MESSAGE_TIMEOUT
request message size; generate a request with count characters |
(package private) long |
messageCount
|
static int |
PACKET_COUNT
How many packets to send in multi-packet tests |
private java.lang.Object |
packetWaiter
|
static java.lang.String |
PUBLIC_CONNECT_HOST
Description of the Field |
static int |
PUBLIC_CONNECT_PORT
Description of the Field |
static int |
REQUEST_MESSAGE_SIZE
request message size; generate a request with count characters |
(package private) ServerTest |
server
|
private static boolean |
verbose
|
Fields inherited from class junit.framework.TestCase |
fName |
Constructor Summary | |
ClientTest(java.lang.String name)
Constructor for the ClientTest object |
|
ClientTest(java.lang.String name,
boolean verbose)
Constructor for the ClientTest object |
Method Summary | |
long |
connect(java.lang.String host,
int port)
Description of the Method |
void |
createMessage(IPMessage message)
Load a message from disk, or generate a text message |
private void |
log(java.lang.Exception e)
|
private void |
log(int level,
java.lang.String s)
|
private void |
log(java.lang.String s)
|
static void |
main(java.lang.String[] args)
|
void |
sendBlockingMessage()
Description of the Method |
void |
sendMessage()
Description of the Method |
protected void |
setUp()
Setup function, called automatically by JUnit framework |
void |
setVerbose(boolean verbose)
|
private static void |
showBytes(java.io.PrintStream out,
byte[] buf)
|
static junit.framework.Test |
suite()
Assembles and returns a test suite for all the test methods of this test case. |
protected void |
tearDown()
Teardown function, called automatically by JUnit framework |
void |
testAsyncPacket()
Test connectivity between this library and itself, with a content packet. |
void |
testAsyncPacketStream()
FIXME: Not implemented correctly; needs to wait for packets Send a stream of async packets, wait until all the responses come back. |
void |
testConnect()
Basic test of connectivity. |
void |
testPacket()
Test connectivity between this library and itself, with a content packet. |
void |
testPacketStream()
Test connectivity between this library and itself, with a content packet. |
void |
testSelfConnect()
Test connectivity between this library and itself. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, name, run, run, runBare, runTest, toString |
Methods inherited from class junit.framework.Assert |
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail, failNotEquals, failNotSame |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final java.lang.String PUBLIC_CONNECT_HOST
public static final int PUBLIC_CONNECT_PORT
public static final int LOOPBACK_LISTEN_PORT
public static final int PACKET_COUNT
public static final int REQUEST_MESSAGE_SIZE
public static final int MESSAGE_TIMEOUT
private final int LEVEL_TRACE
private final int LEVEL_INFO
ServerTest server
private java.lang.Object packetWaiter
private static boolean verbose
IPManager ipmanager
IPAddress address
IPKey key
java.util.Date createDate
long failed
long messageCount
Constructor Detail |
public ClientTest(java.lang.String name)
name
- Description of Parameterpublic ClientTest(java.lang.String name, boolean verbose)
name
- Description of ParameterMethod Detail |
public void testConnect() throws java.io.IOException, java.net.UnknownHostException
public void testSelfConnect() throws java.io.IOException, java.net.UnknownHostException
public void testPacket() throws java.io.IOException, java.net.UnknownHostException
public void testAsyncPacket() throws java.io.IOException, java.net.UnknownHostException
public void testPacketStream() throws java.io.IOException, java.net.UnknownHostException
public void testAsyncPacketStream() throws java.io.IOException, java.net.UnknownHostException
public void setVerbose(boolean verbose)
public long connect(java.lang.String host, int port) throws java.net.UnknownHostException, java.io.IOException
host
- Description of Parameterport
- Description of Parameterpublic void createMessage(IPMessage message)
out
- Description of Parameterpublic void sendMessage()
out
- Description of Parameterpublic void sendBlockingMessage() throws java.io.IOException
out
- Description of Parameterpublic static junit.framework.Test suite()
protected void setUp()
setUp
in class junit.framework.TestCase
protected void tearDown()
tearDown
in class junit.framework.TestCase
public static void main(java.lang.String[] args)
private void log(java.lang.String s)
private void log(int level, java.lang.String s)
private void log(java.lang.Exception e)
private static void showBytes(java.io.PrintStream out, byte[] buf)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |