コード例 #1
0
ファイル: SodaTest.java プロジェクト: superyfwy/db4o
 /** 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();
           }
         }
       }
     }
   }
 }
コード例 #2
0
 protected void invoke() throws Exception {
   _method.invoke(_subject, new Object[0]);
 }