Home | History | Annotate | Download | only in framework

Lines Matching refs:Constructor

5 import java.lang.reflect.Constructor;
27 * TestSuite constructor.
33 * <p>This constructor creates a suite with all the methods
52 Constructor<?> constructor;
54 constructor= getTestConstructor(theClass);
56 return warning("Class "+theClass.getName()+" has no public constructor TestCase(String name) or TestCase()");
60 if (constructor.getParameterTypes().length == 0) {
61 test= constructor.newInstance(new Object[0]);
65 test= constructor.newInstance(new Object[]{name});
70 return(warning("Exception in constructor: "+name+" ("+exceptionToString(e.getTargetException())+")"));
78 * Gets a constructor which takes a single String as
79 * its argument or a no arg constructor.
81 public static Constructor<?> getTestConstructor(Class<?> theClass) throws NoSuchMethodException {
137 addTest(warning("Class "+theClass.getName()+" has no public constructor TestCase(String name) or TestCase()"));