com.eyebolt.iplib
Class IPLibTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--com.eyebolt.iplib.IPLibTest
All Implemented Interfaces:
junit.framework.Test

public class IPLibTest
extends junit.framework.TestCase

Test iplib

Version:
0.01, 12 Jan 1998
Author:
John Gardner

Inner Class Summary
(package private)  class IPLibTest.Listener
           
(package private)  class IPLibTest.Replyer
           
(package private)  class IPLibTest.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
           
static int LOOPBACK_LISTEN_PORT
          Description of the Field
(package private)  long messageCount
           
static java.lang.String PUBLIC_CONNECT_HOST
          Description of the Field
static int PUBLIC_CONNECT_PORT
          Description of the Field
 
Fields inherited from class junit.framework.TestCase
fName
 
Constructor Summary
IPLibTest(java.lang.String name)
          Constructor for the IPLibTest object
 
Method Summary
 long connect(java.lang.String host, int port)
          Description of the Method
 long listen(int port)
          Description of the Method
static void main(java.lang.String[] args)
           
 void sendBlockingMessage(java.io.PrintStream out)
          Description of the Method
 void sendMessage(java.io.PrintStream out)
          Description of the Method
protected  void setUp()
          Setup function, called automatically by JUnit framework
private static void showBytes(java.io.PrintStream out, byte[] buf)
           
 void showResults(java.io.PrintStream out)
          Description of the Method
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 testBlockingPacketStream()
          Test connectivity between this library and itself, with a content packet.
 void testConnect()
          Basic test of connectivity.
 void testListen()
          Test ability to listen on a socket.
 void testPacket()
          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
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

PUBLIC_CONNECT_HOST

public static final java.lang.String PUBLIC_CONNECT_HOST
Description of the Field

PUBLIC_CONNECT_PORT

public static final int PUBLIC_CONNECT_PORT
Description of the Field

LOOPBACK_LISTEN_PORT

public static final int LOOPBACK_LISTEN_PORT
Description of the Field

ipmanager

IPManager ipmanager

address

IPAddress address

key

IPKey key

createDate

java.util.Date createDate

failed

long failed

messageCount

long messageCount
Constructor Detail

IPLibTest

public IPLibTest(java.lang.String name)
Constructor for the IPLibTest object
Parameters:
name - Description of Parameter
Method Detail

testConnect

public void testConnect()
Basic test of connectivity.

testListen

public void testListen()
Test ability to listen on a socket. Listen will stay; following test relies on this one running first.

testSelfConnect

public void testSelfConnect()
Test connectivity between this library and itself. Requires first ListenTest to have been run already, so there's someone to connect to.

testPacket

public void testPacket()
Test connectivity between this library and itself, with a content packet. Requires ListenTest to have been run already, so there's someone to connect to.

testBlockingPacketStream

public void testBlockingPacketStream()
Test connectivity between this library and itself, with a content packet. Requires ListenTest to have been run already, so there's someone to connect to.

connect

public long connect(java.lang.String host,
                    int port)
Description of the Method
Parameters:
host - Description of Parameter
port - Description of Parameter
Returns:
Description of the Returned Value

sendMessage

public void sendMessage(java.io.PrintStream out)
Description of the Method
Parameters:
out - Description of Parameter

sendBlockingMessage

public void sendBlockingMessage(java.io.PrintStream out)
Description of the Method
Parameters:
out - Description of Parameter

listen

public long listen(int port)
Description of the Method
Parameters:
port - Description of Parameter
Returns:
Description of the Returned Value

showResults

public void showResults(java.io.PrintStream out)
Description of the Method
Parameters:
out - Description of Parameter

suite

public static junit.framework.Test suite()
Assembles and returns a test suite for all the test methods of this test case.
Returns:
A non-null test suite.

setUp

protected void setUp()
Setup function, called automatically by JUnit framework
Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Teardown function, called automatically by JUnit framework
Overrides:
tearDown in class junit.framework.TestCase

main

public static void main(java.lang.String[] args)

showBytes

private static void showBytes(java.io.PrintStream out,
                              byte[] buf)


Copyright © 2001 Eyebolt, Inc.