Exemplo n.º 1
0
 /** dynamic execution of all public methods that begin with "test" in all CLASSES */
 protected void test(STClass[] classes) {
   for (int i = 0; i < classes.length; i++) {
     if (jdkOK(classes[i])) {
       System.out.println("  S.O.D.A. testing " + classes[i].getClass().getName());
       currentTestClass = classes[i];
       Method[] methods = classes[i].getClass().getDeclaredMethods();
       for (int j = 0; j < methods.length; j++) {
         Method method = methods[j];
         if (method.getName().startsWith("test")) {
           try {
             method.invoke(classes[i], new Object[0]);
           } catch (Exception e) {
             e.printStackTrace();
           }
         }
       }
     }
   }
 }
Exemplo n.º 2
0
 protected void invoke() throws Exception {
   _method.invoke(_subject, new Object[0]);
 }