com.veraxsystems.icmp.jni
Class IcmpJniBridgeTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.veraxsystems.icmp.jni.IcmpJniBridgeTest
All Implemented Interfaces:
junit.framework.Test

public class IcmpJniBridgeTest
extends junit.framework.TestCase

Unit test for ICMP JNI interface.


Constructor Summary
IcmpJniBridgeTest(java.lang.String testName)
          Create the test case
 
Method Summary
static junit.framework.Test suite()
           
 void testBasicSendReceive()
          Test basing ICMP JNI send/receive.
 void testLoadApi()
          Simple test for ICMP JNI library loading.
 void testSyncThreads()
          Test ICMP JNI interface by sending and receiving data on single IcmpJniBridge object using two threads (sending and receiving threads).
 void testThreads()
          Test using many ICMP socket in parallel threads.
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IcmpJniBridgeTest

public IcmpJniBridgeTest(java.lang.String testName)
Create the test case

Parameters:
testName - name of the test case
Method Detail

suite

public static junit.framework.Test suite()
Returns:
the suite of tests being tested

testLoadApi

public void testLoadApi()
Simple test for ICMP JNI library loading.


testBasicSendReceive

public void testBasicSendReceive()
Test basing ICMP JNI send/receive. The IcmpJniBridge object is created, ICMP echo message is send success is achieved when either response is received or timeout occurs (no API errors are allowed)


testThreads

public void testThreads()
Test using many ICMP socket in parallel threads. Each thread performs socket operations in polling mode - it means single thread is used to send data and receive responses. No API errors are allowed here.


testSyncThreads

public void testSyncThreads()
Test ICMP JNI interface by sending and receiving data on single IcmpJniBridge object using two threads (sending and receiving threads). Again, no API errors are allowed.