*/
private static void test1()
{
try
{
Listener testListener = new Listener( _test_service_socket,
_test_service );
try
{
testListener.start();
Thread.sleep( 1000 ); // allow testListener to startup.
String testString = "testString";
_to_test_service.println( testString );
_to_test_service.flush();
String returnString = _from_test_service.readLine();
if ( testString.equals( returnString ) )
{
System.out.println( _unit_test + "test1: passed" );
_tests_passed++;
}
else
{
System.out.println( _unit_test + "test1: failed" );
_tests_failed++;
}
}
catch ( Exception ex )
{
System.err.println( _unit_test + " test1 " + ex );
_tests_failed++;
}
testListener.stopListener();
}
catch ( IOException ex )
{
System.err.println( _unit_test + " test1 " + ex );
_tests_failed++;