net.sourceforge.sqlunit.test
Class TestingMethodsGenerator

java.lang.Object
  extended by net.sourceforge.sqlunit.test.TestingMethodsGenerator

public class TestingMethodsGenerator
extends java.lang.Object

This class provides dummy methods of various kinds to test the MethodInvokerHandler and DynamicSqlHandler functionality. permission bitmap and loads these into the database.

Version:
$Revision: 1.3 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
TestingMethodsGenerator()
          Default ctor.
TestingMethodsGenerator(java.lang.String cArg)
          Non-default ctor that takes a single String argument.
 
Method Summary
 java.lang.String nonStaticWithArgsAndNullConstructor(java.lang.String anArg)
          An example of a non-static method with a single String argument and with a null constructor for the class.
 java.lang.String nonStaticWithArgsWithConstructor(java.lang.String anArg)
          An example of a non-static method with arguments and a non-null constructor for the class.
 java.lang.String nonStaticWithoutArgsAndNullConstructor()
          An example of a non-static method without any arguments and with a null constructor for the class.
 java.lang.String nonStaticWithoutArgsWithConstructor()
          An example of a non-static method without arguments and a non-null constructor for the class.
static java.lang.String staticMethodWithArgs(java.lang.String anArg)
          An example of a static method with arguments.
static java.lang.String staticMethodWithoutArgs()
          An example of a static method without arguments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestingMethodsGenerator

public TestingMethodsGenerator()
Default ctor.


TestingMethodsGenerator

public TestingMethodsGenerator(java.lang.String cArg)
Non-default ctor that takes a single String argument.

Parameters:
cArg - the constructor argument.
Method Detail

staticMethodWithoutArgs

public static final java.lang.String staticMethodWithoutArgs()
An example of a static method without arguments. Always returns the String "aSimpleResult" corresponding to a mock procedure name.

Returns:
the String "aSimpleResult"

staticMethodWithArgs

public static final java.lang.String staticMethodWithArgs(java.lang.String anArg)
An example of a static method with arguments. Can be used to call a mock procedure which ends with the string "SimpleResult".

Parameters:
anArg - an argument to the method.
Returns:
the value of anArg prefixed to the String "SimpleResult".

nonStaticWithoutArgsAndNullConstructor

public final java.lang.String nonStaticWithoutArgsAndNullConstructor()
An example of a non-static method without any arguments and with a null constructor for the class. Always returns "aSimpleResult".

Returns:
the String "aSimpleResult".

nonStaticWithArgsAndNullConstructor

public final java.lang.String nonStaticWithArgsAndNullConstructor(java.lang.String anArg)
An example of a non-static method with a single String argument and with a null constructor for the class. Can be used to call a mock procedure whose name is anArg followed by the String "SimpleResult".

Parameters:
anArg - an argument to the method.
Returns:
the value of anArg prefixed to the String "SimpleResult".

nonStaticWithoutArgsWithConstructor

public final java.lang.String nonStaticWithoutArgsWithConstructor()
An example of a non-static method without arguments and a non-null constructor for the class. Can be used to call a mock procedure whose name is the constructor argument prefixed to "SimpleResult".

Returns:
the value of cArg prefixed to "SimpleResult".

nonStaticWithArgsWithConstructor

public final java.lang.String nonStaticWithArgsWithConstructor(java.lang.String anArg)
                                                        throws java.lang.Exception
An example of a non-static method with arguments and a non-null constructor for the class. Can be used to call a mock procedure whose name is anArg prefixed to the String "SimpleResult". Can also be used to throw an exception if the constructor argument is identical to the method argument.

Parameters:
anArg - an argument to the method.
Returns:
the value of anArg prefixed to the String "SimpleResult".
Throws:
java.lang.Exception - if the cArg is the same as anArg.