public class DatabaseFileLookupTest
extends TestCase
Constructor and Description |
---|
DatabaseFileLookupTest() |
Modifier and Type | Method and Description |
---|---|
static <R,T> R |
invokeMethod(java.lang.String methodName,
java.lang.Class<T> targetClass,
java.lang.Object... params)
Invokes a method in the supplied class with the given arguments, and
returnes the methods result in the desired type.
|
protected void |
setUp() |
void |
testInsertTestData() |
void |
testTestDatabase()
Tests the prerequisites of this test-class itself.
|
protected void setUp() throws java.lang.Exception
java.lang.Exception
public void testTestDatabase() throws java.lang.Exception
java.lang.Exception
public void testInsertTestData() throws java.lang.Exception
java.lang.Exception
public static <R,T> R invokeMethod(java.lang.String methodName, java.lang.Class<T> targetClass, java.lang.Object... params) throws java.lang.Exception
targetClass
, which is generally described by the generic
parameter T
(for Type). The instance is created using
the default constructor. If the default constructor is not
declared, an Exception will be throwen. However, there is no requirement
on the visibility of the default constructor. methodName
will be invoked. Again, there is no requirement
on the visibility of the method. params
. R
(for Result), and as this type parameter
R
is not further specified, the result my be any type and
does not need to be casted.R
- The result type of the method. Does not need to be declared.T
- The type, on which the method will be invoked.methodName
- Method name to be invoked.targetClass
- Class instance of the type, on which the method is to be
invoked.params
- Parameters for the invokation of the method.java.lang.Exception