/** * 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); }
/** * 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)); }
/** * 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); }
/** * 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)); }
/** * 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)); } }
/** * 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)); }
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));
/** * 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); }
/** * 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)); }
/** * 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)); }
/** * 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); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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)); }
/** * 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); }
/** * 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)); }
private JUnit4Runner(Class clazz, String methodName, int startInclusive, int endExclusive) { this.request = Request.classes(clazz).filterWith( createFilter(methodName, startInclusive, endExclusive) ); }
private JUnit4Runner(Class clazz, String methodName, int startInclusive, int endExclusive) { this.request = Request.classes(clazz).filterWith( createFilter(methodName, startInclusive, endExclusive) ); }
@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); }