コード例 #1
0
 protected void addTestSuiteMethodsFromDependencies() {
   for (CompiledDependency dependency : this.getDependencies()) {
     for (IOpenMethod depMethod :
         dependency.getCompiledOpenClass().getOpenClassWithErrors().getMethods()) {
       if (depMethod instanceof TestSuiteMethod) {
         TestSuiteMethod testSuiteMethod = (TestSuiteMethod) depMethod;
         try {
           // Workaround for set dependency names in method while
           // compile
           if (testSuiteMethod.getModuleName() == null) {
             testSuiteMethod.setModuleName(dependency.getDependencyName());
           }
           TestSuiteMethod newTestSuiteMethod = createNewTestSuiteMethod(testSuiteMethod);
           addMethod(newTestSuiteMethod);
         } catch (OpenlNotCheckedException e) {
           if (Log.isDebugEnabled()) {
             Log.debug(e.getMessage(), e);
           }
           addError(e);
         }
       }
     }
   }
 }
コード例 #2
0
 /**
  * Dispatcher method should be added by adding all candidates of the specified dispatcher to
  * current XlsModuleOpenClass(it will cause adding methods to dispatcher of current module or
  * creating new dispatcher in current module).
  *
  * <p>Previously there was problems because dispatcher from dependency was either added to
  * dispatcher of current module(dispatcher as a candidate in another dispatcher) or added to
  * current module and was modified during the current module processing. FIXME
  *
  * @param dispatcher Dispatcher methods to add.
  */
 public void addDispatcherMethod(OpenMethodDispatcher dispatcher) {
   for (IOpenMethod candidate : dispatcher.getCandidates()) {
     addMethod(candidate);
   }
 }