Java 类org.testng.internal.MethodInstance 实例源码

项目:qaf    文件:TestRunner.java   
/**
 * @@@ remove this
 */
private List<MethodInstance> methodsToMultipleMethodInstances(ITestNGMethod... sl) {
  List<MethodInstance> vResult = Lists.newArrayList();
  for (ITestNGMethod m : sl) {
    vResult.add(new MethodInstance(m));
  }

  return vResult;
}
项目:qaf    文件:TestRunner.java   
private List<IMethodInstance> methodsToMethodInstances(List<ITestNGMethod> sl) {
  List<IMethodInstance> result = new ArrayList<IMethodInstance>();
    for (ITestNGMethod iTestNGMethod : sl) {
      result.add(new MethodInstance(iTestNGMethod));
    }
  return result;
}
项目:tempto    文件:RequirementsExpanderInterceptor.java   
private List<IMethodInstance> expandMethod(IMethodInstance method)
{
    List<IMethodInstance> extendedMethods = Lists.newArrayList();
    Set<Set<Requirement>> testSpecificRequirements = testSpecificRequirementsResolver.resolve(method.getMethod());
    if (testSpecificRequirements.size() == 1) {
        extendedMethods.add(new MethodInstance(new RequirementsAwareTestNGMethod(method.getMethod(), getOnlyElement(testSpecificRequirements))));
    }
    else {
        for (Set<Requirement> requirementSet : testSpecificRequirements) {
            TestNGMethod clonedMethod = (TestNGMethod) method.getMethod().clone();
            extendedMethods.add(new MethodInstance(new RequirementsAwareTestNGMethod(clonedMethod, requirementSet)));
        }
    }
    return extendedMethods;
}