org.junit.runner.Request.classes()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中org.junit.runner.Request.classes方法的一些代码示例,展示了Request.classes的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.classes方法的具体详情如下:
包路径:org.junit.runner.Request
类名称:Request
方法名:classes

Request.classes介绍

[英]Create a Request that, when processed, will run all the tests in a set of classes.
[中]创建一个Request,处理后将运行一组类中的所有测试。

代码示例

代码示例来源:origin: junit-team/junit4

/**
 * Create a <code>Request</code> that, when processed, will run all the tests
 * in a set of classes with the default <code>Computer</code>.
 *
 * @param classes the classes containing the tests
 * @return a <code>Request</code> that will cause all tests in the classes to be run
 */
public static Request classes(Class<?>... classes) {
  return classes(JUnitCore.defaultComputer(), classes);
}

代码示例来源:origin: junit-team/junit4

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param computer Helps construct Runners from classes
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Computer computer, Class<?>... classes) {
  return run(Request.classes(computer, classes));
}

代码示例来源:origin: google/j2objc

/**
 * Create a <code>Request</code> that, when processed, will run all the tests
 * in a set of classes with the default <code>Computer</code>.
 *
 * @param classes the classes containing the tests
 * @return a <code>Request</code> that will cause all tests in the classes to be run
 */
public static Request classes(Class<?>... classes) {
  return classes(JUnitCore.defaultComputer(), classes);
}

代码示例来源:origin: google/j2objc

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param computer Helps construct Runners from classes
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Computer computer, Class<?>... classes) {
  return run(Request.classes(computer, classes));
}

代码示例来源:origin: junit-team/junit4

/**
 * Creates a {@link Request}.
 *
 * @param computer {@link Computer} to be used.
 */
public Request createRequest(Computer computer) {
  if (parserErrors.isEmpty()) {
    Request request = Request.classes(
        computer, classes.toArray(new Class<?>[classes.size()]));
    return applyFilterSpecs(request);
  } else {
    return errorReport(new InitializationError(parserErrors));
  }
}

代码示例来源:origin: google/j2objc

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Class<?>... classes) {
  return run(Request.classes(defaultComputer(), classes));
}

代码示例来源:origin: com.novocode/junit-interface

Class<?> cl = testClassLoader.loadClass(testClassName);
if(shouldRun(fingerprint, cl, settings)) {
 Request request = Request.classes(cl);
 if(globPatterns.size() > 0) request = new SilentFilterRequest(request, new GlobFilter(settings, globPatterns));
 if(testFilter.length() > 0) request = new SilentFilterRequest(request, new TestFilter(testFilter, ed));

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Create a <code>Request</code> that, when processed, will run all the tests
 * in a set of classes with the default <code>Computer</code>.
 *
 * @param classes the classes containing the tests
 * @return a <code>Request</code> that will cause all tests in the classes to be run
 */
public static Request classes(Class<?>... classes) {
  return classes(JUnitCore.defaultComputer(), classes);
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param computer Helps construct Runners from classes
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Computer computer, Class<?>... classes) {
  return run(Request.classes(computer, classes));
}

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Class<?>... classes) {
  return run(Request.classes(defaultComputer(), classes));
}

代码示例来源:origin: org.junit/com.springsource.org.junit

/**
 * Create a <code>Request</code> that, when processed, will run all the tests
 * in a set of classes with the default <code>Computer</code>.
 *
 * @param classes the classes containing the tests
 * @return a <code>Request</code> that will cause all tests in the classes to be run
 */
public static Request classes(Class<?>... classes) {
  return classes(JUnitCore.defaultComputer(), classes);
}

代码示例来源:origin: com.oracle/truffle-tck

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param computer Helps construct Runners from classes
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Computer computer, Class<?>... classes) {
  return run(Request.classes(computer, classes));
}

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param computer Helps construct Runners from classes
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Computer computer, Class<?>... classes) {
  return run(Request.classes(computer, classes));
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.junit

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param computer Helps construct Runners from classes
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Computer computer, Class<?>... classes) {
  return run(Request.classes(computer, classes));
}

代码示例来源:origin: org.junit/com.springsource.org.junit

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param computer Helps construct Runners from classes
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Computer computer, Class<?>... classes) {
  return run(Request.classes(computer, classes));
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.junit

/**
 * Create a <code>Request</code> that, when processed, will run all the tests
 * in a set of classes with the default <code>Computer</code>.
 *
 * @param classes the classes containing the tests
 * @return a <code>Request</code> that will cause all tests in the classes to be run
 */
public static Request classes(Class<?>... classes) {
  return classes(JUnitCore.defaultComputer(), classes);
}

代码示例来源:origin: org.junit/com.springsource.org.junit

/**
 * Run all the tests in <code>classes</code>.
 *
 * @param classes the classes containing tests
 * @return a {@link Result} describing the details of the test run and the failed tests.
 */
public Result run(Class<?>... classes) {
  return run(Request.classes(defaultComputer(), classes));
}

代码示例来源:origin: com.github.dakusui/jcunit

private JUnit4Runner(Class clazz, String methodName, int startInclusive, int endExclusive) {
 this.request = Request.classes(clazz).filterWith(
   createFilter(methodName, startInclusive, endExclusive)
 );
}

代码示例来源:origin: dakusui/jcunit

private JUnit4Runner(Class clazz, String methodName, int startInclusive, int endExclusive) {
 this.request = Request.classes(clazz).filterWith(
   createFilter(methodName, startInclusive, endExclusive)
 );
}

代码示例来源:origin: io.hawt/hawtio-junit

@Override
public ResultDTO runTestClasses(List<String> classNames) throws Exception {
  inProgress = new InProgressDTO();
  JUnitCore core = new JUnitCore();
  core.addListener(new InProgressRunListener(inProgress));
  List<Class<?>> classes = classScanner.optionallyFindClasses(classNames);
  Class<?>[] classArray = new Class<?>[classes.size()];
  classes.toArray(classArray);
  Request request = Request.classes(classArray);
  Result result = core.run(request);
  return new ResultDTO(result);
}

相关文章