Methods Summary |
---|
public static void | assertInstanceOf(java.lang.Class expectedClass, java.lang.Object actual)
TestCase.assertTrue(actual.getClass().getName() + " is not instance of :" + expectedClass.getName(), expectedClass
.isInstance(actual));
|
public static void | assertLenghtOne(java.lang.Object[] array)
TestCase.assertEquals("Array does NOT contain exactly one element.", 1, array.length);
|
public static void | assertLenghtZero(java.lang.Object[] array)
TestCase.assertEquals("Array has more than zero elements.", 0, array.length);
|
public static void | assertNotEquals(java.lang.Object expected, java.lang.Object actual)
TestCase.assertFalse(actual.toString() + " has not to be equal to " + expected.toString(), expected.equals(actual));
|
public java.lang.reflect.TypeVariable | getTypeParameter(java.lang.reflect.Method method)Returns the type parameter of the declaring method.
TypeVariable<Method>[] typeParameters = method.getTypeParameters();
assertLenghtOne(typeParameters);
TypeVariable<Method> typeParameter = typeParameters[0];
return typeParameter;
|
public java.lang.reflect.TypeVariable | getTypeParameter(java.lang.Class clazz)Returns the type parameter of the declaring class.
TypeVariable[] typeParameters = clazz.getTypeParameters();
assertLenghtOne(typeParameters);
TypeVariable<Class> typeVariable = typeParameters[0];
assertEquals(clazz, typeVariable.getGenericDeclaration());
assertEquals("T", typeVariable.getName());
return typeVariable;
|