xmlBlaster 2.1.0 API

org.xmlBlaster.test.C
Class TestC

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.xmlBlaster.test.C.TestC
All Implemented Interfaces:
junit.framework.Test, I_ExecuteListener

public class TestC
extends junit.framework.TestCase
implements I_ExecuteListener

This client tests the C SOCKET client library, it is only a wrapper around the real C tests in xmlBlaster/testsuite/src/c to retrieve the results for our HTML test report (see build.xml 'report' task).

xmlBlaster needs to be started separately.

Invoke examples:

    java junit.textui.TestRunner org.xmlBlaster.test.C.TestC
    java junit.swingui.TestRunner -noloading org.xmlBlaster.test.C.TestC
 


Field Summary
private  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String pathToCBinary
           
(package private)  java.lang.String sep
           
 
Constructor Summary
TestC(java.lang.String testName)
          Constructs the TestC object.
 
Method Summary
private  java.lang.String getXmlBlasterHomePath()
           
static void main(java.lang.String[] args)
          Deprecated. Use the TestRunner from the testsuite to run it
protected  void setUp()
          Sets up the fixture.
 void stderr(java.lang.String data)
           
 void stdout(java.lang.String data)
           
protected  void tearDown()
          Tears down the fixture.
 void test_C_IllegalArguments()
          Test the C API with illegal arguments.
 void test_C_LeaveServer()
          Test the C API implementation, leaving the server without disconnect.
 void test_C_MethodInvocations()
          Test all C method invocations against a running xmlBlaster.
 void test_C_Queue()
          Test the C API persistent queue implementation.
 void test_C_Socket()
          Test the C API SOCKET implementation.
 void test_C_Stress()
          Test all C method invocations against a running xmlBlaster.
 void test_C_Timeout()
           
 void test_C_Util()
          Test all C method invocations against a running xmlBlaster.
 void test_C_XmlUtil()
          Test all C method invocations against a running xmlBlaster.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

glob

private final Global glob

log

private static java.util.logging.Logger log

pathToCBinary

private java.lang.String pathToCBinary

sep

java.lang.String sep
Constructor Detail

TestC

public TestC(java.lang.String testName)
Constructs the TestC object.

Parameters:
testName - The name used in the test suite
Method Detail

setUp

protected void setUp()
Sets up the fixture.

We start an own xmlBlaster server in a separate thread, it is configured to load the tinySQL C driver to test SQL access (with dBase files)

Then we connect as a client

Overrides:
setUp in class junit.framework.TestCase

getXmlBlasterHomePath

private java.lang.String getXmlBlasterHomePath()
Returns:
for example ""

tearDown

protected void tearDown()
Tears down the fixture.

cleaning up .... erase() the previous message OID and logout

Overrides:
tearDown in class junit.framework.TestCase

test_C_MethodInvocations

public void test_C_MethodInvocations()
Test all C method invocations against a running xmlBlaster.


test_C_IllegalArguments

public void test_C_IllegalArguments()
Test the C API with illegal arguments.


test_C_Stress

public void test_C_Stress()
Test all C method invocations against a running xmlBlaster.


test_C_Util

public void test_C_Util()
Test all C method invocations against a running xmlBlaster.


test_C_XmlUtil

public void test_C_XmlUtil()
Test all C method invocations against a running xmlBlaster.


test_C_Timeout

public void test_C_Timeout()

test_C_Queue

public void test_C_Queue()
Test the C API persistent queue implementation.


test_C_LeaveServer

public void test_C_LeaveServer()
Test the C API implementation, leaving the server without disconnect.


test_C_Socket

public void test_C_Socket()
Test the C API SOCKET implementation.


stdout

public void stdout(java.lang.String data)
Specified by:
stdout in interface I_ExecuteListener

stderr

public void stderr(java.lang.String data)
Specified by:
stderr in interface I_ExecuteListener

main

public static void main(java.lang.String[] args)
Deprecated. Use the TestRunner from the testsuite to run it

Invoke: java org.xmlBlaster.test.C.TestC


xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.