org.apache.xmlrpc.test
Class BaseTest

java.lang.Object
  extended by TestCase
      extended by org.apache.xmlrpc.test.XmlRpcTestCase
          extended by org.apache.xmlrpc.test.BaseTest

public class BaseTest
extends XmlRpcTestCase

An abstract test case, to be implemented for the various transport classes.


Nested Class Summary
static class BaseTest.Remote
          The remote class being invoked by the test case.
 
Field Summary
private static java.lang.String INT_TAG
           
private static java.lang.String INT_URI
           
private static java.lang.String ROOT_TAG
           
 
Fields inherited from class org.apache.xmlrpc.test.XmlRpcTestCase
providers
 
Constructor Summary
BaseTest()
           
 
Method Summary
private  void checkMap(java.util.Map pResult)
           
protected  org.apache.xmlrpc.server.XmlRpcHandlerMapping getHandlerMapping()
           
private  java.util.Calendar newCalendarParam()
           
private  java.util.Calendar newCalendarResult()
           
 void testByteArrayParam()
          Test, whether we can invoke a method, passing a byte array.
private  void testByteArrayParam(ClientProvider pProvider)
           
 void testByteArrayResult()
          Test, whether we can invoke a method, returning a byte array.
private  void testByteArrayResult(ClientProvider pProvider)
           
 void testByteParam()
          Test, whether we can invoke a method, passing a byte value.
private  void testByteParam(ClientProvider pProvider)
           
 void testByteResult()
          Test, whether we can invoke a method, returning a byte.
private  void testByteResult(ClientProvider pProvider)
           
 void testCalendarParam()
          Tests, whether we can invoke a method, passing an instance of Calendar as a parameter.
private  void testCalendarParam(ClientProvider pProvider)
           
 void testCatchNPE()
          Tests, whether a NullPointerException, thrown by the server, can be trapped by the client.
private  void testCatchNPE(ClientProvider pProvider)
           
 void testDateParam()
          Tests, whether we can invoke a method, passing an instance of Date as a parameter.
private  void testDateParam(ClientProvider pProvider)
           
 void testDoubleParam()
          Test, whether we can invoke a method, passing a double value.
private  void testDoubleParam(ClientProvider pProvider)
           
 void testDoubleResult()
          Test, whether we can invoke a method, returning a double value.
private  void testDoubleResult(ClientProvider pProvider)
           
 void testFloatParam()
          Test, whether we can invoke a method, passing a float value.
private  void testFloatParam(ClientProvider pProvider)
           
 void testFloatResult()
          Test, whether we can invoke a method, returning a float value.
private  void testFloatResult(ClientProvider pProvider)
           
 void testIntParam()
          Test, whether we can invoke a method, passing an integer value.
private  void testIntParam(ClientProvider pProvider)
           
 void testLongParam()
          Test, whether we can invoke a method, passing a long value.
private  void testLongParam(ClientProvider pProvider)
           
 void testLongResult()
          Test, whether we can invoke a method, returning a long value.
private  void testLongResult(ClientProvider pProvider)
           
 void testMapParam()
          Test, whether we can invoke a method, passing a map.
private  void testMapParam(ClientProvider pProvider)
           
 void testMapResult()
          Test, whether we can invoke a method, returning a map.
private  void testMapResult(ClientProvider pProvider)
           
 void testNodeParam()
          Test, whether we can invoke a method, passing a DOM node as parameter.
private  void testNodeParam(ClientProvider pProvider)
           
 void testNullableStringParam()
          Test, whether we can invoke a method, passing a string value or null.
private  void testNullableStringParam(ClientProvider pProvider)
           
 void testNullableStringResult()
          Test, whether we can invoke a method, returning a string value or null.
private  void testNullableStringResult(ClientProvider pProvider)
           
 void testObjectArrayParam()
          Test, whether we can invoke a method, passing an object array.
private  void testObjectArrayParam(ClientProvider pProvider)
           
 void testObjectArrayResult()
          Test, whether we can invoke a method, returning an object array.
private  void testObjectArrayResult(ClientProvider pProvider)
           
 void testSerializableParam()
          Test, whether we can invoke a method, passing an instance of Serializable as a parameter.
private  void testSerializableParam(ClientProvider pProvider)
           
 void testShortParam()
          Test, whether we can invoke a method, passing a short value.
private  void testShortParam(ClientProvider pProvider)
           
 void testShortResult()
          Test, whether we can invoke a method, returning a short value.
private  void testShortResult(ClientProvider pProvider)
           
 void testStringParam()
          Test, whether we can invoke a method, passing a string value.
private  void testStringParam(ClientProvider pProvider)
           
 
Methods inherited from class org.apache.xmlrpc.test.XmlRpcTestCase
getConfig, getExConfig, getHandlerMapping, getTypeConverterFactory, initProviders, setUp, tearDown, writeRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT_TAG

private static final java.lang.String ROOT_TAG
See Also:
Constant Field Values

INT_TAG

private static final java.lang.String INT_TAG
See Also:
Constant Field Values

INT_URI

private static final java.lang.String INT_URI
See Also:
Constant Field Values
Constructor Detail

BaseTest

public BaseTest()
Method Detail

getHandlerMapping

protected org.apache.xmlrpc.server.XmlRpcHandlerMapping getHandlerMapping()
                                                                   throws java.io.IOException,
                                                                          org.apache.xmlrpc.XmlRpcException
Specified by:
getHandlerMapping in class XmlRpcTestCase
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testByteParam

public void testByteParam()
                   throws java.lang.Exception
Test, whether we can invoke a method, passing a byte value.

Throws:
java.lang.Exception - The test failed.

testByteParam

private void testByteParam(ClientProvider pProvider)
                    throws java.lang.Exception
Throws:
java.lang.Exception

testByteResult

public void testByteResult()
                    throws java.lang.Exception
Test, whether we can invoke a method, returning a byte.

Throws:
java.lang.Exception - The test failed.

testByteResult

private void testByteResult(ClientProvider pProvider)
                     throws java.lang.Exception
Throws:
java.lang.Exception

testShortParam

public void testShortParam()
                    throws java.lang.Exception
Test, whether we can invoke a method, passing a short value.

Throws:
java.lang.Exception - The test failed.

testShortParam

private void testShortParam(ClientProvider pProvider)
                     throws java.lang.Exception
Throws:
java.lang.Exception

testShortResult

public void testShortResult()
                     throws java.lang.Exception
Test, whether we can invoke a method, returning a short value.

Throws:
java.lang.Exception - The test failed.

testShortResult

private void testShortResult(ClientProvider pProvider)
                      throws java.lang.Exception
Throws:
java.lang.Exception

testIntParam

public void testIntParam()
                  throws java.lang.Exception
Test, whether we can invoke a method, passing an integer value.

Throws:
java.lang.Exception - The test failed.

testIntParam

private void testIntParam(ClientProvider pProvider)
                   throws java.lang.Exception
Throws:
java.lang.Exception

testLongParam

public void testLongParam()
                   throws java.lang.Exception
Test, whether we can invoke a method, passing a long value.

Throws:
java.lang.Exception - The test failed.

testLongParam

private void testLongParam(ClientProvider pProvider)
                    throws java.lang.Exception
Throws:
java.lang.Exception

testLongResult

public void testLongResult()
                    throws java.lang.Exception
Test, whether we can invoke a method, returning a long value.

Throws:
java.lang.Exception - The test failed.

testLongResult

private void testLongResult(ClientProvider pProvider)
                     throws java.lang.Exception
Throws:
java.lang.Exception

testStringParam

public void testStringParam()
                     throws java.lang.Exception
Test, whether we can invoke a method, passing a string value.

Throws:
java.lang.Exception - The test failed.

testStringParam

private void testStringParam(ClientProvider pProvider)
                      throws java.lang.Exception
Throws:
java.lang.Exception

testNullableStringParam

public void testNullableStringParam()
                             throws java.lang.Exception
Test, whether we can invoke a method, passing a string value or null.

Throws:
java.lang.Exception - The test failed.

testNullableStringParam

private void testNullableStringParam(ClientProvider pProvider)
                              throws java.lang.Exception
Throws:
java.lang.Exception

testNullableStringResult

public void testNullableStringResult()
                              throws java.lang.Exception
Test, whether we can invoke a method, returning a string value or null.

Throws:
java.lang.Exception - The test failed.

testNullableStringResult

private void testNullableStringResult(ClientProvider pProvider)
                               throws java.lang.Exception
Throws:
java.lang.Exception

testFloatParam

public void testFloatParam()
                    throws java.lang.Exception
Test, whether we can invoke a method, passing a float value.

Throws:
java.lang.Exception - The test failed.

testFloatParam

private void testFloatParam(ClientProvider pProvider)
                     throws java.lang.Exception
Throws:
java.lang.Exception

testFloatResult

public void testFloatResult()
                     throws java.lang.Exception
Test, whether we can invoke a method, returning a float value.

Throws:
java.lang.Exception - The test failed.

testFloatResult

private void testFloatResult(ClientProvider pProvider)
                      throws java.lang.Exception
Throws:
java.lang.Exception

testDoubleParam

public void testDoubleParam()
                     throws java.lang.Exception
Test, whether we can invoke a method, passing a double value.

Throws:
java.lang.Exception - The test failed.

testDoubleParam

private void testDoubleParam(ClientProvider pProvider)
                      throws java.lang.Exception
Throws:
java.lang.Exception

testDoubleResult

public void testDoubleResult()
                      throws java.lang.Exception
Test, whether we can invoke a method, returning a double value.

Throws:
java.lang.Exception - The test failed.

testDoubleResult

private void testDoubleResult(ClientProvider pProvider)
                       throws java.lang.Exception
Throws:
java.lang.Exception

testByteArrayParam

public void testByteArrayParam()
                        throws java.lang.Exception
Test, whether we can invoke a method, passing a byte array.

Throws:
java.lang.Exception - The test failed.

testByteArrayParam

private void testByteArrayParam(ClientProvider pProvider)
                         throws java.lang.Exception
Throws:
java.lang.Exception

testByteArrayResult

public void testByteArrayResult()
                         throws java.lang.Exception
Test, whether we can invoke a method, returning a byte array.

Throws:
java.lang.Exception - The test failed.

testByteArrayResult

private void testByteArrayResult(ClientProvider pProvider)
                          throws java.lang.Exception
Throws:
java.lang.Exception

testObjectArrayParam

public void testObjectArrayParam()
                          throws java.lang.Exception
Test, whether we can invoke a method, passing an object array.

Throws:
java.lang.Exception - The test failed.

testObjectArrayParam

private void testObjectArrayParam(ClientProvider pProvider)
                           throws java.lang.Exception
Throws:
java.lang.Exception

testObjectArrayResult

public void testObjectArrayResult()
                           throws java.lang.Exception
Test, whether we can invoke a method, returning an object array.

Throws:
java.lang.Exception - The test failed.

testObjectArrayResult

private void testObjectArrayResult(ClientProvider pProvider)
                            throws java.lang.Exception
Throws:
java.lang.Exception

testMapParam

public void testMapParam()
                  throws java.lang.Exception
Test, whether we can invoke a method, passing a map.

Throws:
java.lang.Exception - The test failed.

testMapParam

private void testMapParam(ClientProvider pProvider)
                   throws java.lang.Exception
Throws:
java.lang.Exception

checkMap

private void checkMap(java.util.Map pResult)

testMapResult

public void testMapResult()
                   throws java.lang.Exception
Test, whether we can invoke a method, returning a map.

Throws:
java.lang.Exception - The test failed.

testMapResult

private void testMapResult(ClientProvider pProvider)
                    throws java.lang.Exception
Throws:
java.lang.Exception

testNodeParam

public void testNodeParam()
                   throws java.lang.Exception
Test, whether we can invoke a method, passing a DOM node as parameter.

Throws:
java.lang.Exception - The test failed.

testNodeParam

private void testNodeParam(ClientProvider pProvider)
                    throws java.lang.Exception
Throws:
java.lang.Exception

testSerializableParam

public void testSerializableParam()
                           throws java.lang.Exception
Test, whether we can invoke a method, passing an instance of Serializable as a parameter.

Throws:
java.lang.Exception - The test failed.

testSerializableParam

private void testSerializableParam(ClientProvider pProvider)
                            throws java.lang.Exception
Throws:
java.lang.Exception

testCalendarParam

public void testCalendarParam()
                       throws java.lang.Exception
Tests, whether we can invoke a method, passing an instance of Calendar as a parameter.

Throws:
java.lang.Exception - The test failed.

testCalendarParam

private void testCalendarParam(ClientProvider pProvider)
                        throws java.lang.Exception
Throws:
java.lang.Exception

newCalendarResult

private java.util.Calendar newCalendarResult()

newCalendarParam

private java.util.Calendar newCalendarParam()

testDateParam

public void testDateParam()
                   throws java.lang.Exception
Tests, whether we can invoke a method, passing an instance of Date as a parameter.

Throws:
java.lang.Exception - The test failed.

testDateParam

private void testDateParam(ClientProvider pProvider)
                    throws java.lang.Exception
Throws:
java.lang.Exception

testCatchNPE

public void testCatchNPE()
                  throws java.lang.Exception
Tests, whether a NullPointerException, thrown by the server, can be trapped by the client.

Throws:
java.lang.Exception

testCatchNPE

private void testCatchNPE(ClientProvider pProvider)
                   throws java.lang.Exception
Throws:
java.lang.Exception